]> granicus.if.org Git - python/commit
(Merge 3.4) asyncio: sync with Tulip
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 24 Jul 2014 22:55:23 +0000 (00:55 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 24 Jul 2014 22:55:23 +0000 (00:55 +0200)
commit3953398363f687f27d551b46f7ce9371727a5c71
treeff86556dfb7111184aec34b8c5526de8e6414f74
parentc82a17940034faa6e8178f50d001c3a54fc47ac0
parentfea6a100dc51012cb0187374ad31de330ebc0035
(Merge 3.4) asyncio: sync with Tulip

Improve stability of the proactor event loop, especially operations on
overlapped objects:

* Tulip issue 195: Don't call UnregisterWait() twice if a _WaitHandleFuture is
  cancelled twice to fix a crash.
* IocpProactor.close(): cancel futures to cancel overlapped operations, instead
  of cancelling directly overlapped operations. Future objects may not call
  ov.cancel() if the future was cancelled or if the overlapped was already
  cancelled. The cancel() method of the future may also catch exceptions. Log
  also errors on cancellation.
* tests: rename "f" to "fut"
* Add a __repr__() method to IocpProactor
* Add a destructor to IocpProactor which closes it
* _OverlappedFuture.cancel() doesn't cancel the overlapped anymore if it is
  done: if it is already cancelled or completed. Log also an error if the
  cancellation failed.
* Add the address of the overlapped object in repr(_OverlappedFuture)
* _OverlappedFuture truncates the source traceback to hide the call to the
  parent constructor (useless in debug).