diff options
author | Guido van Rossum <guido@dropbox.com> | 2013-10-30 14:52:03 -0700 |
---|---|---|
committer | Guido van Rossum <guido@dropbox.com> | 2013-10-30 14:52:03 -0700 |
commit | 9cee2e7642d21d62f3ec7277572145d5fbc11b6f (patch) | |
tree | 825822e44bbebbdfde8ca64932b6b43000eb793e /Lib/asyncio/proactor_events.py | |
parent | 2fe62fbf83fddc611bf0a30e28c8012d1b7106e0 (diff) | |
download | cpython-9cee2e7642d21d62f3ec7277572145d5fbc11b6f.tar.gz |
asyncio: Add support for running subprocesses on Windows with the IOCP event loop (Richard Oudkerk).
Diffstat (limited to 'Lib/asyncio/proactor_events.py')
-rw-r--r-- | Lib/asyncio/proactor_events.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py index cb8625d942..ce226b9ba5 100644 --- a/Lib/asyncio/proactor_events.py +++ b/Lib/asyncio/proactor_events.py @@ -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: |