diff options
author | Jacob Bower <1978924+jbower-fb@users.noreply.github.com> | 2023-05-09 17:09:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 17:09:16 (GMT) |
commit | 2866e030f01dc3ff08de32857fa77d52468b676b (patch) | |
tree | 1f1c1a421c168c9046741b319dfd35fc9396303f /Doc | |
parent | c3b595e73efac59360d6dc869802abc752092460 (diff) | |
download | cpython-2866e030f01dc3ff08de32857fa77d52468b676b.zip cpython-2866e030f01dc3ff08de32857fa77d52468b676b.tar.gz cpython-2866e030f01dc3ff08de32857fa77d52468b676b.tar.bz2 |
gh-97696 Add documentation for get_coro() behavior with eager tasks (#104304)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/asyncio-task.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index b2d7362..fe8d028 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -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 |