gh-121333: Clarify what is the default executor for asyncio.run_in_executor (#121335)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
AN Long 2024-07-09 17:22:07 +08:00 committed by GitHub
parent 15d48aea02
commit facf9862da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View 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::