]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-121333: Clarify what is the default executor for asyncio.run_in_executor (#121335)
authorAN Long <aisk@users.noreply.github.com>
Tue, 9 Jul 2024 09:22:07 +0000 (17:22 +0800)
committerGitHub <noreply@github.com>
Tue, 9 Jul 2024 09:22:07 +0000 (14:52 +0530)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Doc/library/asyncio-eventloop.rst

index 1d79f78e8e1b67934b1ac1223e10b8f7e6bda4a5..70bdd154d6c406db770702152d0d4ba15422095a 100644 (file)
@@ -1262,6 +1262,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::