Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit 6b912f5

Browse files
committed
Don't configure the number of workers for default threadpool executor.
See CPython issue #26796. Initial patch by Hans Lawrenz.
1 parent f9b0d51 commit 6b912f5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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
@@ -619,7 +616,7 @@ def run_in_executor(self, executor, func, *args):
619616
if executor is None:
620617
executor = self._default_executor
621618
if executor is None:
622-
executor = concurrent.futures.ThreadPoolExecutor(_MAX_WORKERS)
619+
executor = concurrent.futures.ThreadPoolExecutor()
623620
self._default_executor = executor
624621
return futures.wrap_future(executor.submit(func, *args), loop=self)
625622

0 commit comments

Comments
 (0)