M
Mathias Mamsch
Hi all,
i am writing a python extension in c++. In the extension a c++ thread
calls back into python. I did it like this:
---- c++ code ----
PyGILState_STATE gstate;
gstate = PyGILState_Ensure ();
.... do some work ...
// call the python callback (Func)
result = PyEval_CallObject(Func, arglist);
.... so some cleanup ...
PyGILState_Release (gstate);
return
-----------------
the callback is executed properly, but the PyGILState_Release gives me the
following error:
"Fatal Python error: PyThreadState_Delete: tstate is still current"
What can be wrong here? Any suggestions?
In my understanding this error should not occur ... Is this a known bug
maybe? I am using Python 2.4a1 under windows.
Thanks in advance, Mathias Mamsch
i am writing a python extension in c++. In the extension a c++ thread
calls back into python. I did it like this:
---- c++ code ----
PyGILState_STATE gstate;
gstate = PyGILState_Ensure ();
.... do some work ...
// call the python callback (Func)
result = PyEval_CallObject(Func, arglist);
.... so some cleanup ...
PyGILState_Release (gstate);
return
-----------------
the callback is executed properly, but the PyGILState_Release gives me the
following error:
"Fatal Python error: PyThreadState_Delete: tstate is still current"
What can be wrong here? Any suggestions?
In my understanding this error should not occur ... Is this a known bug
maybe? I am using Python 2.4a1 under windows.
Thanks in advance, Mathias Mamsch