
Oct. 20, 2009
11:52 p.m.
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.