[issue12328] multiprocessing's overlapped PipeConnection on Windows

Antoine Pitrou report at bugs.python.org
Wed Nov 23 01:03:25 CET 2011


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

> Here is an updated patch (pipe_poll_fix.patch) which should be applied
> on top of sigint_event.patch.
> 
> It fixes the problems with PipeConnection.poll() and Queue.empty() and
> makes PipeListener.accept() use overlapped I/O.  This should make all
> the pipe releated blocking functions/methods interruptible on Windows.

I have the feeling that if we have to call GetLastError() at the Python
level, then there's something wrong with the APIs we're exposing from
the C extension. 
I see you check for ERROR_OPERATION_ABORTED. Is there any situation
where this can happen?
Also, it seems strange to call ov.cancel() and then
ov.GetOverlappedResult(). AFAICT, those two operations should be
mutually exclusive: you call the former if e.g. WaitForMultipleObjects
raised an exception, the latter otherwise.

----------

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


More information about the Python-bugs-list mailing list