From: Yury Selivanov Date: Tue, 18 Sep 2018 03:58:00 +0000 (-0400) Subject: bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380) X-Git-Tag: v3.8.0a1~953 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac94e38d076aebc56c2ff96a249b5e40f32633ea;p=thirdparty%2FPython%2Fcpython.git bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380) --- diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 0320d798c1e5..20d18c02976b 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -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()