Threads sleeping all instead of just one.
Diez B. Roggisch
deets at nospam.web.de
Wed Jan 18 15:02:05 EST 2006
Vaclav Havlik schrieb:
> Hello. Could you advise me about this, please?
> I write a multi-thread program using the 'threading' module. Moreover, I use C++ extension. Two threads work inside this C++ extension in such way that one thread waits for the other to do something. However it seems that ALL python is stopped by the first thread stopping. And not that the one thread stops and the other runs to wake the former up, as it is intended in the C++ extension.
> Is it the problem, that I am not using Python's synchronization means, but C++'s ?
> Thank you very much. V.
I guess the problem lies in not releasing the GIL
(GlobalInterpreterLock) inside your C++-Extension. That makes the
interpreter lock.
Google for that, you'll find plenty of stuff on the GIL.
Regards,
DIez
More information about the Python-list
mailing list