Threading and GIL

googler.1.webmaster at spamgourmet.com googler.1.webmaster at spamgourmet.com
Thu May 7 03:20:09 EDT 2009


Hi,

thats the reason why its not working. Imagine the end() method of the
thread object is called so the C++ Function is opened where the code
for this method is in.

At a line the Code ...->End() is called which waits that the C++
Thread class
is finished. BUT here is the problem: In the Method of the C++ class
which is in threaded mode can't run because its still waiting that the
GIL
is released by the thread which executed the ->End() command.

So the app has a deadlock when it arrives at       ->End() and
PyGILState_Ensure
function.



More information about the Python-list mailing list