Skip to content

Commit 00cf5ea

Browse files
gh-129169: update asyncio.ensure_future docs to suggest taskgroups
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent 9d127e8 commit 00cf5ea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/asyncio-future.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ Future Functions
5151

5252
.. important::
5353

54-
See also the :func:`create_task` function which is the
55-
preferred way for creating new Tasks.
56-
5754
Save a reference to the result of this function, to avoid
5855
a task disappearing mid-execution.
5956

57+
See also the :func:`create_task` function which is the
58+
preferred way for creating new tasks or use :class:`asyncio.TaskGroup`
59+
which keeps reference to the task internally.
60+
6061
.. versionchanged:: 3.5.1
6162
The function accepts any :term:`awaitable` object.
6263

0 commit comments

Comments
 (0)