Skip to content

Commit

Permalink
gh-95180: Add TaskGroup and Runner to AsyncIO API Index (GH-95189)
Browse files Browse the repository at this point in the history
Also rearrange some items in the list.

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
(cherry picked from commit 2a9e4e4)

Co-authored-by: siph <42943030+siphc@users.noreply.github.com>
  • Loading branch information
miss-islington and siphc committed Sep 2, 2022
1 parent fca8e94 commit 57116d5
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions Doc/library/asyncio-api-index.rst
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 57116d5

Please sign in to comment.