On Apr 4, 2011, at 9:08 AM, Wiktor Adamski wrote:
> I have 2 threads in C code using python 2.5.2. First thread creates
> new interpreter (i need several interpreters but those 2 threads use
> only one) like that:
>
> PyEval_AcquireLock();
> threadState = Py_NewInterpreter();
> PyThreadState_Swa
I have 2 threads in C code using python 2.5.2. First thread creates
new interpreter (i need several interpreters but those 2 threads use
only one) like that:
PyEval_AcquireLock();
threadState = Py_NewInterpreter();
PyThreadState_Swap(threadState);
// calling python API
PyThreadState_Swap(NULL);