mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-35279: reduce default max_workers of ThreadPoolExecutor (GH-13618)
This commit is contained in:
parent
293e9f86b8
commit
9a7e5b1b42
4 changed files with 22 additions and 5 deletions
|
@ -755,8 +755,8 @@ class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest, BaseTestCase):
|
|||
|
||||
def test_default_workers(self):
|
||||
executor = self.executor_type()
|
||||
self.assertEqual(executor._max_workers,
|
||||
(os.cpu_count() or 1) * 5)
|
||||
expected = min(32, (os.cpu_count() or 1) + 4)
|
||||
self.assertEqual(executor._max_workers, expected)
|
||||
|
||||
def test_saturation(self):
|
||||
executor = self.executor_type(4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue