Author pitrou
Recipients asksol, brian.curtin, jnoller, kristjan.jonsson, pitrou, tim.golden
Date 2011-05-07.00:39:43
SpamBayes Score 0.000123447
Marked as misclassified No
Message-id <1304728784.42.0.985321241331.issue11668@psf.upfronthosting.co.za>
In-reply-to
Content
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()!)
History
Date User Action Args
2011-05-07 00:39:44pitrousetrecipients: + pitrou, kristjan.jonsson, tim.golden, jnoller, brian.curtin, asksol
2011-05-07 00:39:44pitrousetmessageid: <1304728784.42.0.985321241331.issue11668@psf.upfronthosting.co.za>
2011-05-07 00:39:43pitroulinkissue11668 messages
2011-05-07 00:39:43pitroucreate