From: Andrew Svetlov Date: Fri, 27 Dec 2024 13:58:35 +0000 (+0100) Subject: Mention loop_factory argument in docstring for asyncio.run() (#128288) X-Git-Tag: v3.14.0a4~184 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b5f1fae573a2c658eb000433ad7b87e9c40c697;p=thirdparty%2FPython%2Fcpython.git Mention loop_factory argument in docstring for asyncio.run() (#128288) --- diff --git a/Lib/asyncio/runners.py b/Lib/asyncio/runners.py index b9adf291d481..14397b4ad0c7 100644 --- a/Lib/asyncio/runners.py +++ b/Lib/asyncio/runners.py @@ -177,6 +177,7 @@ def run(main, *, debug=None, loop_factory=None): running in the same thread. If debug is True, the event loop will be run in debug mode. + If loop_factory is passed, it is used for new event loop creation. This function always creates a new event loop and closes it at the end. It should be used as a main entry point for asyncio programs, and should