Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions Doc/library/asyncio-future.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Future Functions
See also the :func:`create_task` function which is the
preferred way for creating new Tasks.

Save a reference to the result of this function, to avoid
a task disappearing mid execution.

.. versionchanged:: 3.5.1
The function accepts any :term:`awaitable` object.

Expand Down
5 changes: 5 additions & 0 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ Creating Tasks
task = asyncio.ensure_future(coro())
...

.. important::

Save a reference to the result of this function, to avoid
a task disappearing mid execution.

.. versionadded:: 3.7

.. versionchanged:: 3.8
Expand Down