Multiprocessing concurrent.futures issue

I think the issue you’re running into is an issue I’ve seen in other 3d software. Basically the multiprocessing is spawning off other Python interpreter instances, and since Blender is the Python interpreter, it is spawning other Blender instances. The way I’ve worked around that is to explicitly create a Python (outside of Blender) subprocess and do all of your calculations that way.

Another way you could go about this is as @Zyl said, subprocess another binary, or create a Python module in C/C++/Rust (these languages have ways to “easily” create modules… not sure about other languages, though) and do the computation there instead.

In all 3 of these examples, you lose access to the Blender API, but that might be okay, since the Blender API may not be super thread friendly.

2 Likes