[issue11618] Locks broken wrt timeouts on Windows

Kristján Valur Jónsson report at bugs.python.org
Thu Apr 19 12:26:52 CEST 2012


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

Here is a new patch.
This uses critical sections and condition variables to avoid kernel mode switches for locks. Windows mutexes are expensive and for uncontented locks, this offers a big win.

It also adds an internal set of critical section/condition variable structures, that can be used on windows to do other such things without resorting to explicit kernel objects.

This code works on XP and newer, since it relies on the "semaphore" kernel object being present.  In addition, if compiled to target Vista or greater, it will use the built-in critical section primitives and the  FRWLock objects (which are faster still than CriticalSection objects and more robust)

----------
status: pending -> open
Added file: http://bugs.python.org/file25271/ntlocks.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11618>
_______________________________________


More information about the Python-bugs-list mailing list