• Victor Stinner's avatar
    asyncio: sync with Tulip · fea6a100
    Victor Stinner yazdı
    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).
    fea6a100
test_windows_events.py 4.48 KB