[Python-ideas] Ideas towards GIL removal (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sun Apr 15 13:37:15 CEST 2007
- Previous message: [Python-ideas] Ideas towards GIL removal
- Next message: [Python-ideas] Ideas towards GIL removal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Josiah Carlson wrote:
Certainly, but thread B isn't the owning thread, thread A was the owning thread, and by virtue of decrefing its thread count to zero, acquiring the GIL, and checking the global refcount to make sure that either someone else is responsible for its deallocation (global refcount > 0), or that thread A is responsible for its deallocation (global refcount == 0).
Thread B holding the GIL doesn't help, because the local refcount is not covered by the GIL. Thread A must be able to assume it has total ownership of the local refcount, otherwise there's no benefit in the scheme.
-- Greg
- Previous message: [Python-ideas] Ideas towards GIL removal
- Next message: [Python-ideas] Ideas towards GIL removal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]