Well, depends on what you want to achieve :)
First, I don't think you can call Py_Initialize on many threads. You
have special function to initialise different interpreters on per-thread
basis.
However, the main problem is: do you want to share data across your
threads ? If the answer is 'no' the
Hello,
I am embedding a python script in a C++ application. The script can be
called simultaneously from multiple threads.
What is the correct way to implement this situation:
1) Have unique python interpreter instantiations ( Py_Initialize() ) for
each thread.
2) Have one python interpreter