summaryrefslogtreecommitdiffstats
path: root/Doc/library/concurrent.futures.rst
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-05-28 12:02:52 (GMT)
committerGitHub <noreply@github.com>2019-05-28 12:02:52 (GMT)
commit9a7e5b1b42abcedb895b1ce49d83fe067d01835c (patch)
treeed8b62255e53b785f13dd4130b2d22540b352aed /Doc/library/concurrent.futures.rst
parent293e9f86b8d10fcd88d6a2015babae76e9a8bd8f (diff)
downloadcpython-9a7e5b1b42abcedb895b1ce49d83fe067d01835c.zip
cpython-9a7e5b1b42abcedb895b1ce49d83fe067d01835c.tar.gz
cpython-9a7e5b1b42abcedb895b1ce49d83fe067d01835c.tar.bz2
bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618)
Diffstat (limited to 'Doc/library/concurrent.futures.rst')
-rw-r--r--Doc/library/concurrent.futures.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst
index ffc29d7..f2491dd 100644
--- a/Doc/library/concurrent.futures.rst
+++ b/Doc/library/concurrent.futures.rst
@@ -159,6 +159,15 @@ And::
.. versionchanged:: 3.7
Added the *initializer* and *initargs* arguments.
+ .. versionchanged:: 3.8
+ Default value of *max_workers* is changed to ``min(32, os.cpu_count() + 4)``.
+ This default value preserves at least 5 workers for I/O bound tasks.
+ It utilizes at most 32 CPU cores for CPU bound tasks which release the GIL.
+ And it avoids using very large resources implicitly on many-core machines.
+
+ ThreadPoolExecutor now reuses idle worker threads before starting
+ *max_workers* worker threads too.
+
.. _threadpoolexecutor-example: