Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ cancel
Method
cancel
Lib/test/test_asyncio/test_futures.py:63–67 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
61
__exception = None
62
63
def
cancel(self):
64
if
self.done():
65
return
False
66
self.__cancelled = True
67
return
True
68
69
def
cancelled(self):
70
return
self.__cancelled
Callers
15
sleep_n_crash
Method · 0.45
test_async_gen_asyncio_shutdown_01
Method · 0.45
test_cancel
Method · 0.45
test_cancel_concurrent
Method · 0.45
test_cancel_correct_event
Method · 0.45
test_exception_cancel
Method · 0.45
handle_echo
Method · 0.45
test_isfuture
Method · 0.45
test_initial_state
Method · 0.45
test_uninitialized
Method · 0.45
test_future_cancel_message_getter
Method · 0.45
test_future_cancel_message_setter
Method · 0.45
Calls
1
done
Method · 0.95
Tested by
no test coverage detected