Reputation: 1982
I want to use my C++ code with Python's multiprocessing
so that my C++ code is called from different processes in parallel. The code does not save any state and no memory sharing is required between the different processes. I decided to use Boost/Python to allow my C++ library to be imported into Python.
However, this FAQ says that Boost/Python is not compatible with multiple interpreters. I am trying to understand what this means exactly. Specifically, does this means that calling my C++ code through Boost/Python with multiprocessing
would be problematic?
Upvotes: 0
Views: 350
Reputation: 393653
Multiple processes don't require more than 1 interpreter per process.
Also, the way you describe the situation is that you use a native module from Python. In that case Python is supplying the interpreter, anyways.
The way I understand the 1-interpreter limitation applies to embedding python from within C++ - a rather limited subset of the Boost Python features.
Upvotes: 2