[issue11618] Locks broken wrt timeouts on Windows

Antoine Pitrou report at bugs.python.org
Sun Mar 20 20:07:32 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> Have you tried benchmarking it?
> 
> Interlocked functions are *much* faster than Win32 mutex/semaphores in
> the uncontended case.  

Well, I'd rather have obviously correct code than
difficult-to-understand "speedy" code.

The patch I've posted takes less than a microsecond per acquire/release
pair, and that's in a virtual machine to begin with.

> Do you really want the GIL to be 10 times slower in the uncontended case? ;-)

The GIL doesn't use these functions (see ceval_gil.h).

----------

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


More information about the Python-bugs-list mailing list