]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 18 Sep 2018 04:12:05 +0000 (21:12 -0700)
committerGitHub <noreply@github.com>
Tue, 18 Sep 2018 04:12:05 +0000 (21:12 -0700)
(cherry picked from commit ac94e38d076aebc56c2ff96a249b5e40f32633ea)

Co-authored-by: Yury Selivanov <yury@magic.io>
Doc/library/asyncio-eventloop.rst

index 3b13a81a5b6aa399f8c912df4bb6390b1624c34e..252224218572d0814f4114b6191fe7f2cac2e733 100644 (file)
@@ -152,8 +152,12 @@ Running and stopping the loop
    close with an :meth:`~agen.aclose()` call.  After calling this method,
    the event loop will issue a warning if a new asynchronous generator
    is iterated. This should be used to reliably finalize all scheduled
-   asynchronous generators, e.g.::
+   asynchronous generators.
 
+   Note that there is no need to call this function when
+   :func:`asyncio.run` is used.
+
+   Example::
 
     try:
         loop.run_forever()