New submission from Antoine Pitrou <pit...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue32076>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to