mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-97696 Add documentation for get_coro() behavior with eager tasks (#104304)
This commit is contained in:
parent
c3b595e73e
commit
2866e030f0
1 changed files with 11 additions and 0 deletions
|
@ -527,6 +527,8 @@ Running Tasks Concurrently
|
|||
and there is no running event loop.
|
||||
|
||||
|
||||
.. _eager-task-factory:
|
||||
|
||||
Eager Task Factory
|
||||
==================
|
||||
|
||||
|
@ -1174,8 +1176,17 @@ Task Object
|
|||
|
||||
Return the coroutine object wrapped by the :class:`Task`.
|
||||
|
||||
.. note::
|
||||
|
||||
This will return ``None`` for Tasks which have already
|
||||
completed eagerly. See the :ref:`Eager Task Factory <eager-task-factory>`.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
|
||||
Newly added eager task execution means result may be ``None``.
|
||||
|
||||
.. method:: get_context()
|
||||
|
||||
Return the :class:`contextvars.Context` object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue