summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/windows_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-21 23:18:11 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-21 23:18:11 (GMT)
commit5b511a0b1e49c9f040ad3186843180253b73c0b6 (patch)
tree92e0c10abaab4df5a08ec37dba0de9f9394754d6 /Lib/asyncio/windows_events.py
parent91d11bbb2d5742b291e48e9889bd9c51b0b39fb6 (diff)
parent1ca9392c7083972c1953c02e6f2cca54934ce0a6 (diff)
downloadcpython-5b511a0b1e49c9f040ad3186843180253b73c0b6.zip
cpython-5b511a0b1e49c9f040ad3186843180253b73c0b6.tar.gz
cpython-5b511a0b1e49c9f040ad3186843180253b73c0b6.tar.bz2
Merge 3.4 (asyncio)
Diffstat (limited to 'Lib/asyncio/windows_events.py')
-rw-r--r--Lib/asyncio/windows_events.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 5105426..3cb5690f 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -163,6 +163,9 @@ class _WaitCancelFuture(_BaseWaitHandleFuture):
self._done_callback = None
+ def cancel(self):
+ raise RuntimeError("_WaitCancelFuture must not be cancelled")
+
def _schedule_callbacks(self):
super(_WaitCancelFuture, self)._schedule_callbacks()
if self._done_callback is not None:
@@ -693,6 +696,9 @@ class IocpProactor:
# FIXME: Tulip issue 196: remove this case, it should not happen
elif fut.done() and not fut.cancelled():
del self._cache[address]
+ elif isinstance(fut, _WaitCancelFuture):
+ # _WaitCancelFuture must not be cancelled
+ pass
else:
try:
fut.cancel()