MCPcopy Index your code
hub / github.com/python/cpython / cancel

Method cancel

Lib/asyncio/events.py:78–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

76 return self._context
77
78 def cancel(self):
79 if not self._cancelled:
80 self._cancelled = True
81 if self._loop.get_debug():
82 # Keep a representation in debug mode to keep callback and
83 # parameters. For example, to log the warning
84 # "Executing <Handle...> took 2.5 second"
85 self._repr = repr(self)
86 self._callback = None
87 self._args = None
88
89 def cancelled(self):
90 return self._cancelled

Callers 7

test_handleMethod · 0.95
test_handle_reprMethod · 0.95
cancelMethod · 0.45
cancelMethod · 0.45

Calls 1

get_debugMethod · 0.45

Tested by 5

test_handleMethod · 0.76
test_handle_reprMethod · 0.76