Skip to content

Commit 4187f2a

Browse files
aiskkumaraditya303
authored andcommitted
pythongh-121333: Clarify what is the default executor for asyncio.run_in_executor (python#121335)
Co-authored-by: Kumar Aditya <[email protected]>
1 parent ba47add commit 4187f2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,9 @@ Executing code in thread or process pools
12621262

12631263
The *executor* argument should be an :class:`concurrent.futures.Executor`
12641264
instance. The default executor is used if *executor* is ``None``.
1265+
The default executor can be set by :meth:`loop.set_default_executor`,
1266+
otherwise, a :class:`concurrent.futures.ThreadPoolExecutor` will be
1267+
lazy-initialized and used by :func:`run_in_executor` if needed.
12651268

12661269
Example::
12671270

0 commit comments

Comments
 (0)