summaryrefslogtreecommitdiff
path: root/Lib/asyncio/base_subprocess.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-18 23:47:27 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-12-18 23:47:27 +0100
commit1b9763d0a9c62c13dc2a06770032e5906b610c96 (patch)
tree5908c0aae7f5fb134d71eafd16defad46ad88474 /Lib/asyncio/base_subprocess.py
parentdc7765d12c8b3008935659d70970ac3cd563e566 (diff)
downloadcpython-git-1b9763d0a9c62c13dc2a06770032e5906b610c96.tar.gz
asyncio: sync with Tulip
* Fix a race condition in BaseSubprocessTransport._try_finish(). If the process exited before the _post_init() method was called, scheduling the call to _call_connection_lost() with call_soon() is wrong: connection_made() must be called before connection_lost(). Reuse the BaseSubprocessTransport._call() method to schedule the call to _call_connection_lost() to ensure that connection_made() and connection_lost() are called in the correct order. * Add repr(PipeHandle) * Fix typo
Diffstat (limited to 'Lib/asyncio/base_subprocess.py')
-rw-r--r--Lib/asyncio/base_subprocess.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py
index d008779360..81698b0985 100644
--- a/Lib/asyncio/base_subprocess.py
+++ b/Lib/asyncio/base_subprocess.py
@@ -153,7 +153,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
if all(p is not None and p.disconnected
for p in self._pipes.values()):
self._finished = True
- self._loop.call_soon(self._call_connection_lost, None)
+ self._call(self._call_connection_lost, None)
def _call_connection_lost(self, exc):
try: