I want to release the GIL

Diez B. Roggisch deets at nospam.web.de
Tue Oct 21 03:49:03 EDT 2008


Piotr Sobolewski schrieb:
> Thanks for answers.
> But what about my main question? Is it possible to release GIL without
> sleeping? I know that in this example situation I can achieve my goals
> without that - I can just move sleep outside of locked block. But I
> just want to know it for future - can I just do something like
> thread.gil_release()?
> 
> 

No, you can't. That is the reason for the python multiprocessing module 
http://docs.python.org/library/multiprocessing.html, which is part of 
2.6 standard lib.

For older python versions, there is "processing" that essentially does 
the same.

Diez



More information about the Python-list mailing list