summaryrefslogtreecommitdiff
path: root/asyncio/windows_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-25 12:33:53 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-07-25 12:33:53 +0200
commit5b3ed14ed61f14e01ac0d1b11757e64119a14084 (patch)
tree15921f0da48003791748e1ba020cc8c261f65381 /asyncio/windows_events.py
parent5c4040ff30890b702b50e33bb0e02229fc5395ab (diff)
downloadtrollius-5b3ed14ed61f14e01ac0d1b11757e64119a14084.tar.gz
_OverlappedFuture.set_exception() now cancels the overlapped operation.
Diffstat (limited to 'asyncio/windows_events.py')
-rw-r--r--asyncio/windows_events.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/asyncio/windows_events.py b/asyncio/windows_events.py
index 0842d8a..375003c 100644
--- a/asyncio/windows_events.py
+++ b/asyncio/windows_events.py
@@ -73,6 +73,10 @@ class _OverlappedFuture(futures.Future):
self._cancel_overlapped()
return super().cancel()
+ def set_exception(self, exception):
+ super().set_exception(exception)
+ self._cancel_overlapped()
+
class _WaitHandleFuture(futures.Future):
"""Subclass of Future which represents a wait handle."""