Skip to content

Commit 57116d5

Browse files
gh-95180: Add TaskGroup and Runner to AsyncIO API Index (GH-95189)
Also rearrange some items in the list. Co-authored-by: Thomas Grainger <[email protected]> (cherry picked from commit 2a9e4e4) Co-authored-by: siph <[email protected]>
1 parent fca8e94 commit 57116d5

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

Doc/library/asyncio-api-index.rst

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,25 @@ await on multiple things with timeouts.
2121
* - :func:`run`
2222
- Create event loop, run a coroutine, close the loop.
2323

24+
* - :class:`Runner`
25+
- A context manager that simplifies multiple async function calls.
26+
27+
* - :class:`Task`
28+
- Task object.
29+
30+
* - :class:`TaskGroup`
31+
- A context manager that holds a group of tasks. Provides
32+
a convenient and reliable way to wait for all tasks in the group to
33+
finish.
34+
2435
* - :func:`create_task`
25-
- Start an asyncio Task.
36+
- Start an asyncio Task, then returns it.
37+
38+
* - :func:`current_task`
39+
- Return the current Task.
40+
41+
* - :func:`all_tasks`
42+
- Return all tasks that are not yet finished for an event loop.
2643

2744
* - ``await`` :func:`sleep`
2845
- Sleep for a number of seconds.
@@ -39,14 +56,8 @@ await on multiple things with timeouts.
3956
* - ``await`` :func:`wait`
4057
- Monitor for completion.
4158

42-
* - :func:`current_task`
43-
- Return the current Task.
44-
45-
* - :func:`all_tasks`
46-
- Return all tasks for an event loop.
47-
48-
* - :class:`Task`
49-
- Task object.
59+
* - :func:`timeout`
60+
- Run with a timeout. Useful in cases when `wait_for` is not suitable.
5061

5162
* - :func:`to_thread`
5263
- Asynchronously run a function in a separate OS thread.

0 commit comments

Comments
 (0)