sbt <[email protected]> added the comment:
I have done an updated patch. (It does *not* switch to using bytes oriented
pipes as I suggested in the previous message.)
The patch also adds a wait() function with signature
wait(object_list, timeout=None)
for polling multiple objects at once. On Unix it is just a wrapper for
select.select(object_list, [], [], timeout)
except that it retries when it gets EINTR. wait() works with "connected"
sockets too, although on Windows it does not work for "listening" sockets.
The patch removes SentinelReady and changes concurrent.futures to use wait()
instead.
Polling is now done by issuing zero length overlapped reads. This means that
the pipe is not modified except possibly if a zero length message is removed.
I changed ReadFile(), WriteFile() and GetOverlappedResult() to return pairs,
the second entry of which is zero or an "expected" error code. (Unexpected
errors still raise an exception.) This avoids the need to ever use
GetLastError().
----------
Added file: http://bugs.python.org/file24388/pipe_poll_fix.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12328>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com