]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-121333: Clarify what is the default executor for asyncio.run_in_executor...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 9 Jul 2024 09:36:40 +0000 (11:36 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Jul 2024 09:36:40 +0000 (15:06 +0530)
gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335)
(cherry picked from commit facf9862da0cf9331550747197800d682cd371fb)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Doc/library/asyncio-eventloop.rst

index 6081a052e6e9da755f11877a3322b57ceba0aded..2b6f7df10718a8c0830d0b60c1a256a4b4d4079e 100644 (file)
@@ -1246,6 +1246,9 @@ Executing code in thread or process pools
 
    The *executor* argument should be an :class:`concurrent.futures.Executor`
    instance. The default executor is used if *executor* is ``None``.
+   The default executor can be set by :meth:`loop.set_default_executor`,
+   otherwise, a :class:`concurrent.futures.ThreadPoolExecutor` will be
+   lazy-initialized and used by :func:`run_in_executor` if needed.
 
    Example::