diff options
author | Guido van Rossum <guido@dropbox.com> | 2013-10-30 21:52:03 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@dropbox.com> | 2013-10-30 21:52:03 (GMT) |
commit | 5969128a865db887a8a723acc46d5ebd720ebfe8 (patch) | |
tree | 1193fcefd2ff8e5ada11d2fd507deeab8b5826ac /Lib/asyncio/proactor_events.py | |
parent | 90fb914b4b90f74a9ab4c12d2a3aa2fa2090f3c7 (diff) | |
download | cpython-5969128a865db887a8a723acc46d5ebd720ebfe8.zip cpython-5969128a865db887a8a723acc46d5ebd720ebfe8.tar.gz cpython-5969128a865db887a8a723acc46d5ebd720ebfe8.tar.bz2 |
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 cb8625d..ce226b9 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: |