10000 [3.12] gh-121333: Clarify what is the default executor for asyncio.ru… · python/cpython@f24f316 · GitHub
[go: up one dir, main page]

Skip to content

Commit f24f316

Browse files
miss-islingtonaiskkumaraditya303
authored
[3.12] gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335) (#121525)
gh-121333: Clarify what is the default executor for asyncio.run_in_executor (GH-121335) (cherry picked from commit facf986) Co-authored-by: AN Long <aisk@users.noreply.github.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent 4b04696 commit f24f316

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
@@ -1246,6 +1246,9 @@ Executing code in thread or process pools
12461246

12471247
The *executor* argument should be an :class:`concurrent.futures.Executor`
12481248
instance. The default executor is used if *executor* is ``None``.
1249+
The default executor can be set by :meth:`loop.set_default_executor`,
1250+
otherwise, a :class:`concurrent.futures.ThreadPoolExecutor` will be
1251+
lazy-initialized and used by :func:`run_in_executor` if needed.
12491252

12501253
Example::
12511254

0 commit comments

Comments
 (0)
0