[New-bugs-announce] [issue32076] Expose LockFile on Windows

Antoine Pitrou report at bugs.python.org
Sun Nov 19 15:21:43 EST 2017


New submission from Antoine Pitrou <pitrou at free.fr>:

msvcrt.locking() is sometimes practically useless since its so-called "non-blocking" mode will still block for 1 second.  Instead, the Windows API LockFile() function (and its companion UnlockFile()) allows real non-blocking locking.

Right now you have to call LockFile() using ctypes (see https://github.com/mwilliamson/locket.py/pull/8/files for an example).  It would be nice to expose it somewhere, for example in msvcrt or another module.

----------
components: Library (Lib), Windows
messages: 306514
nosy: paul.moore, pitrou, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Expose LockFile on Windows
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32076>
_______________________________________


More information about the New-bugs-announce mailing list