Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Be precise about cancelling()
  • Loading branch information
gvanrossum authored Sep 26, 2022
commit 9296af072edea169ae4d10f17a536dbee719d443
5 changes: 3 additions & 2 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1217,8 +1217,9 @@ Task Object

.. method:: cancelling()

Return the number of cancellation requests to this Task, i.e.,
the number of calls to :meth:`cancel`.
Return the number of pending cancellation requests to this Task, i.e.,
the number of calls to :meth:`cancel` less the number of
:meth:`uncancel` calls.

Note that if this number is greater than zero but the Task is
still executing, :meth:`cancelled` will still return ``False``.
Expand Down