Status of Python threading support (GIL removal)?

Ben Charrow bcharrow at csail.mit.edu
Fri Jun 19 09:53:08 EDT 2009


Jure Erznožnik wrote:
> See here for introduction:
> http://groups.google.si/group/comp.lang.python/browse_thread/thread/370f8a1747f0fb91
> 
> Digging through my problem, I discovered Python isn't exactly thread
> safe and to solve the issue, there's this Global Interpreter Lock
> (GIL) in place.
> Effectively, this causes the interpreter to utilize one core when
> threading is not used and .95 of a core when threading is utilized.
> 
> Is there any work in progess on core Python modules that will
> permanently resolve this issue?
> Is there any other way to work around the issue aside from forking new
> processes or using something else?

There is a group of people working on an alternative implementation to Python
that, among other things, will not have a GIL:
http://code.google.com/p/unladen-swallow/

There was even a successful attempt to remove the GIL from CPython, but it
caused single threaded python code to be much slower.  See more here:
http://www.python.org/doc/faq/library/#can-t-we-get-rid-of-the-global-interpreter-lock

Cheers,
Ben




More information about the Python-list mailing list