[Python-ideas] Remove GIL with CAS instructions?
Sturla Molden
sturla at molden.no
Wed Oct 21 01:52:39 CEST 2009
Casey Duncan skrev:
>
> They looked like spinlocks to me, I was assuming you were talking
> about something else even more magical. I was still considering them
> locks.
The code is almost like spinlocks, except the refcount acts as its own
"spinlock", thus the overhead is halved. (A separate spinlock would have
to be released as well.)
The failed attempt to remove the GIL used OS mutexes, which are much
more expensive sleeplocks.
More information about the Python-ideas
mailing list