[Python-ideas] Ideas towards GIL removal

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 14 03:51:49 CEST 2007

Josiah Carlson wrote:
> If thread B decrefs the global refcount, and it
> becomes 0, then it can check the thread refcount and notice it is
> nonzero and not deallocate, or if it notices that it *is* zero, then
> since it already has the GIL (necessary to have decrefed the global
> refcount), it can pass the object to the deallocator.

The problem with that is the owning thread needs to be
able to manipulate the local refcount without holding
any kind of lock. That's the whole point of it.


More information about the Python-ideas mailing list