diff options
author | siph <42943030+siphc@users.noreply.github.com> | 2022-09-02 16:36:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 16:36:45 (GMT) |
commit | 2a9e4e4d73683d9c10b6811da81075f1f51c13a2 (patch) | |
tree | f0cbc555ad8751b3e319414123cdd1275de96ca8 /Doc/library/asyncio-api-index.rst | |
parent | 511ca9452033ef95bc7d7fc404b8161068226002 (diff) | |
download | cpython-2a9e4e4d73683d9c10b6811da81075f1f51c13a2.zip cpython-2a9e4e4d73683d9c10b6811da81075f1f51c13a2.tar.gz cpython-2a9e4e4d73683d9c10b6811da81075f1f51c13a2.tar.bz2 |
gh-95180: Add `TaskGroup` and `Runner` to AsyncIO API Index (#95189)
Also rearrange some items in the list.
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Diffstat (limited to 'Doc/library/asyncio-api-index.rst')
-rw-r--r-- | Doc/library/asyncio-api-index.rst | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/Doc/library/asyncio-api-index.rst b/Doc/library/asyncio-api-index.rst index a4e38e4..54c1cd6 100644 --- a/Doc/library/asyncio-api-index.rst +++ b/Doc/library/asyncio-api-index.rst @@ -21,8 +21,25 @@ await on multiple things with timeouts. * - :func:`run` - Create event loop, run a coroutine, close the loop. + * - :class:`Runner` + - A context manager that simplifies multiple async function calls. + + * - :class:`Task` + - Task object. + + * - :class:`TaskGroup` + - A context manager that holds a group of tasks. Provides + a convenient and reliable way to wait for all tasks in the group to + finish. + * - :func:`create_task` - - Start an asyncio Task. + - Start an asyncio Task, then returns it. + + * - :func:`current_task` + - Return the current Task. + + * - :func:`all_tasks` + - Return all tasks that are not yet finished for an event loop. * - ``await`` :func:`sleep` - Sleep for a number of seconds. @@ -39,14 +56,8 @@ await on multiple things with timeouts. * - ``await`` :func:`wait` - Monitor for completion. - * - :func:`current_task` - - Return the current Task. - - * - :func:`all_tasks` - - Return all tasks for an event loop. - - * - :class:`Task` - - Task object. + * - :func:`timeout` + - Run with a timeout. Useful in cases when `wait_for` is not suitable. * - :func:`to_thread` - Asynchronously run a function in a separate OS thread. |