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_STAT E gstate;
gstate = PyGILState_Ensu re ();
.... do some work ...
// call the python callback (Func)
result = PyEval_CallObje ct(Func, arglist);
.... so some cleanup ...
PyGILState_Rele ase (gstate);
return
-----------------
the callback is executed properly, but the PyGILState_Rele ase gives me the
following error:
"Fatal Python error: PyThreadState_D elete: 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_STAT E gstate;
gstate = PyGILState_Ensu re ();
.... do some work ...
// call the python callback (Func)
result = PyEval_CallObje ct(Func, arglist);
.... so some cleanup ...
PyGILState_Rele ase (gstate);
return
-----------------
the callback is executed properly, but the PyGILState_Rele ase gives me the
following error:
"Fatal Python error: PyThreadState_D elete: 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
Comment