Skip to content

Commit ac94e38

Browse files
authored
bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380)
1 parent dbdee00 commit ac94e38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,12 @@ Running and stopping the loop
152152
close with an :meth:`~agen.aclose()` call. After calling this method,
153153
the event loop will issue a warning if a new asynchronous generator
154154
is iterated. This should be used to reliably finalize all scheduled
155-
asynchronous generators, e.g.::
155+
asynchronous generators.
156156

157+
Note that there is no need to call this function when
158+
:func:`asyncio.run` is used.
159+
160+
Example::
157161

158162
try:
159163
loop.run_forever()

0 commit comments

Comments
 (0)