Re: PyThreadState_Swap crash

2011-04-04 Thread Philip Semanchuk
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

PyThreadState_Swap crash

2011-04-04 Thread Wiktor Adamski
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);