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
This commit is contained in:
Victor Stinner 2014-12-18 23:47:27 +01:00
parent dc7765d12c
commit 1b9763d0a9
3 changed files with 9 additions and 2 deletions

View file

@ -402,7 +402,7 @@ class IocpProactor:
ov.getresult()
return pipe
# FIXME: Tulip issue 196: why to we neeed register=False?
# FIXME: Tulip issue 196: why do we need register=False?
# See also the comment in the _register() method
return self._register(ov, pipe, finish_accept_pipe,
register=False)