Why GIL? (was Re: what's the point of rpython?)

Bryan Olson fakeaddress at nowhere.org
Sat Jan 24 05:22:31 CET 2009

Paul Rubin wrote:
> Bryan Olson writes:
>>> BTW, class instances are usually immutable and thus don't require a
>>> mutex in the system I described.

>> Then you are describing a language radically different from Python.
> That one threw me for a minute too, but I think the idea is that the
> class instance itself is immutable, while its slots (specifically the
> attribute dictionary) point to mutable objects.

The meaning of 'immutable' is well-established in the Python literature. 
Python's immutable types include tuple, frozenset, and various kinds of 
numbers and strings. Class instances, not so much.

What's more, this matters when considering a GIL-less implementation. 
Typical method calls can traverse lots of mutable stuff just to find the 
function to invoke.


More information about the Python-list mailing list