Issue #26796: Don't configure the number of workers for default threa… · python/cpython@e8a6045 · GitHub
Skip to content

Commit e8a6045

Browse files
author
Yury Selivanov
committed
Issue #26796: Don't configure the number of workers for default threadpool executor.
Initial patch by Hans Lawrenz.
1 parent 9f91e85 commit e8a6045

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

Doc/library/asyncio-eventloop.rst

Lines changed: 7 additions & 0 deletions

Lib/asyncio/base_events.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
__all__ = ['BaseEventLoop']
4242

4343

44-
# Argument for default thread pool executor creation.
45-
_MAX_WORKERS = 5
46-
4744
# Minimum number of _scheduled timer handles before cleanup of
4845
# cancelled handles is performed.
4946
_MIN_SCHEDULED_TIMER_HANDLES = 100
@@ -616,7 +613,7 @@ def run_in_executor(self, executor, func, *args):
616613
if executor is None:
617614
executor = self._default_executor
618615
if executor is None:
619-
executor = concurrent.futures.ThreadPoolExecutor(_MAX_WORKERS)
616+
executor = concurrent.futures.ThreadPoolExecutor()
620617
self._default_executor = executor
621618
return futures.wrap_future(executor.submit(func, *args), loop=self)
622619

Misc/NEWS

Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)