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

Method cancelling

Lib/asyncio/tasks.py:225–231  ·  view source on GitHub ↗

Return the count of the task's cancellation requests. This count is incremented when .cancel() is called and may be decremented using .uncancel().

(self)

Source from the content-addressed store, hash-verified

223 return True
224
225 def cancelling(self):
226 """Return the count of the task's cancellation requests.
227
228 This count is incremented when .cancel() is called
229 and may be decremented using .uncancel().
230 """
231 return self._num_cancels_requested
232
233 def uncancel(self):
234 """Decrement the task's count of cancellation requests.

Callers 13

_task_repr_infoFunction · 0.80
_aexitMethod · 0.80
__aenter__Method · 0.80
runMethod · 0.80
mainMethod · 0.80
innerMethod · 0.80
outerMethod · 0.80
test_cancellingMethod · 0.80
test_uncancel_basicMethod · 0.80

Calls

no outgoing calls

Tested by 10

runMethod · 0.64
mainMethod · 0.64
innerMethod · 0.64
outerMethod · 0.64
test_cancellingMethod · 0.64
test_uncancel_basicMethod · 0.64