mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
asyncio: Add support for running subprocesses on Windows with the IOCP event loop (Richard Oudkerk).
This commit is contained in:
parent
90fb914b4b
commit
5969128a86
7 changed files with 137 additions and 195 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue