asyncio: Add support for running subprocesses on Windows with the IOCP event loop (Richard Oudkerk).

This commit is contained in:
Guido van Rossum 2013-10-30 14:52:03 -07:00
parent 90fb914b4b
commit 5969128a86
7 changed files with 137 additions and 195 deletions

View file

@ -267,8 +267,15 @@ class BaseProactorEventLoop(base_events.BaseEventLoop):
return _ProactorReadPipeTransport(self, sock, protocol, waiter, extra)
def _make_write_pipe_transport(self, sock, protocol, waiter=None,
extra=None):
return _ProactorWritePipeTransport(self, sock, protocol, waiter, extra)
extra=None, check_for_hangup=True):
if check_for_hangup:
# We want connection_lost() to be called when other end closes
return _ProactorDuplexPipeTransport(self,
sock, protocol, waiter, extra)
else:
# If other end closes we may not notice for a long time
return _ProactorWritePipeTransport(self, sock, protocol, waiter,
extra)
def close(self):
if self._proactor is not None: