Message135393
| Author |
pitrou |
| Recipients |
asksol, brian.curtin, jnoller, kristjan.jonsson, pitrou, tim.golden |
| Date |
2011年05月07日.00:39:43 |
| SpamBayes Score |
0.00012344749 |
| 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()!) |
|