Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(880)

Unified Diff: asyncio/windows_events.py

Issue 96620044: Optional exception argument to Future.cancel()
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « asyncio/tasks.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: asyncio/windows_events.py
===================================================================
--- a/asyncio/windows_events.py
+++ b/asyncio/windows_events.py
@@ -39,12 +39,12 @@
super().__init__(loop=loop)
self.ov = ov
- def cancel(self):
+ def cancel(self, exc=None):
try:
self.ov.cancel()
except OSError:
pass
- return super().cancel()
+ return super().cancel(exc)
class _WaitHandleFuture(futures.Future):
@@ -54,8 +54,8 @@
super().__init__(loop=loop)
self._wait_handle = wait_handle
- def cancel(self):
- super().cancel()
+ def cancel(self, exc=None):
+ super().cancel(exc)
try:
_overlapped.UnregisterWait(self._wait_handle)
except OSError as e:
« no previous file with comments | « asyncio/tasks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b