[issue8299] Improve GIL in 2.7

Kristján Valur Jónsson report at bugs.python.org
Sat Apr 3 14:37:35 CEST 2010


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

Antoine:  Please take a look, the change is really simple, particularly the ROUNDROBIN_GIL variant which fixes the originally observed problem.
the GIL is still a lock, implemented using a mutex and a semaphore.  It is modified to work exactly as the lock always has done on windows (which is why the original problem isn't present on that platform).

The simplicity of the change stems from the fact that the gil is still just a mutex-type object, which is aqcuired and released just as it has always been.  The change is in the internal rules of the mutex, making sure that threads queue up properly and (optionally) that they are released in a priority based order.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8299>
_______________________________________


More information about the Python-bugs-list mailing list