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
Apply suggestions from Guido's code review
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
  • Loading branch information
ambv and gvanrossum authored Jul 27, 2022
commit 4a6a2fe901b714c5ceba97242ae655d22b76fa76
8 changes: 3 additions & 5 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,10 @@ perform clean-up logic. In case :exc:`asyncio.CancelledError`
is explicitly caught, it should generally be propagated when
clean-up is complete. Most code can safely ignore :exc:`asyncio.CancelledError`.

asyncio components that enable structured concurrency, like
The asyncio components that enable structured concurrency, like
:class:`asyncio.TaskGroup` and the :func:`asyncio.timeout` context manager,
Comment thread
gvanrossum marked this conversation as resolved.
Outdated
are implemented using cancellation internally and might misbehave if
a coroutine swallows :exc:`asyncio.CancelledError`. In particular,
they might :func:`uncancel <asyncio.Task.uncancel>` a task to properly
isolate cancelling only a given structured block within the task's body.
a coroutine swallows :exc:`asyncio.CancelledError`.

.. _taskgroups:

Expand Down Expand Up @@ -1188,7 +1186,7 @@ Task Object

Note that if this number is greater than zero but the Task is
still executing, :meth:`cancelled` will still return ``False``.
It's because this number can be lowered by calling :meth:`uncancel`,
This is because this number can be lowered by calling :meth:`uncancel`,
which can lead to the task not being cancelled after all if the
cancellation requests go down to zero.

Expand Down