[issue11668] _multiprocessing.Connection.poll with timeout uses polling under Windows

Antoine Pitrou report at bugs.python.org
Sat May 7 02:39:44 CEST 2011


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

This doesn't seem to be so easy. WFMO (or WFSO) often seems to return successfully while there's no message to read on the pipe end. Here is a sample session (disturbing results):

>>> a, b = connection.Pipe(True)
>>> win32.WaitForMultipleObjects([a._handle], True, 1000)
258
>>> win32.WaitForMultipleObjects([b._handle], True, 1000)
0
>>> win32.PeekNamedPipe(a._handle)
(0, 0)
>>> win32.WaitForMultipleObjects([a._handle], True, 1000)
0

(do note how the end created with CreateFile() is considered ready by WaitForMultipleObjects, while the end created with CreateNamedPipe() is considered ready after an unsuccessful call to PeekNamedPipe()!)

----------

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


More information about the Python-bugs-list mailing list