[Python-Dev] Making the GIL faster & lighter on Windows

Nick Coghlan ncoghlan at gmail.com
Wed May 27 13:24:02 CEST 2009


Martin v. Löwis wrote:
 > No: fairness in mutex synchronization means that every waiter for the
> mutex will eventually acquire it; it won't happen that one thread
> starves waiting for the mutex. This is something that the mutex needs to
> provide, not the application.

CriticalSections are first come first served on Windows, just like a
regular mutex.  As Phillip already noted, their main limitation is that
they don't work cross-process (of course, that's also where they get
their extra speed).

Since we don't need the cross-process feature and we don't support Win
9x any more, this is certainly an idea worth looking at.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list