[Python-Dev] Variant of removing GIL.

"Martin v. Löwis" martin at v.loewis.de
Fri Sep 16 23:10:18 CEST 2005


Sokolov Yura wrote:
> I think I know how to remove GIL!!!! Obviously I am an idiot.

Not an idiot, just lazy :-) Please try to implement your ideas,
and I predict that you will find:
1. it is a lot of work to implement
2. it requires changes to all C files, in particular to extension
   modules outside the Python source tree proper.
3. performing the conversion, even in a semi-mechanical way, will
   introduce many new bugs, in the form of race conditions because
   of missing locks.

Optionally, you may also find that the performance of the
interpreter will decrease.

I haven't really tried to completely understand your proposal, but
you are right, in principle, that a global lock can be replaced with
more fine-grained locks. However, this is really hard to do
correctly - if it were simple, it would have been done long ago.

Regards,
Martin


More information about the Python-Dev mailing list