mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merge 3.5 (issue #26796)
This commit is contained in:
commit
6330f2a5ce
3 changed files with 12 additions and 4 deletions
|
@ -41,9 +41,6 @@ from .log import logger
|
|||
__all__ = ['BaseEventLoop']
|
||||
|
||||
|
||||
# Argument for default thread pool executor creation.
|
||||
_MAX_WORKERS = 5
|
||||
|
||||
# Minimum number of _scheduled timer handles before cleanup of
|
||||
# cancelled handles is performed.
|
||||
_MIN_SCHEDULED_TIMER_HANDLES = 100
|
||||
|
@ -620,7 +617,7 @@ class BaseEventLoop(events.AbstractEventLoop):
|
|||
if executor is None:
|
||||
executor = self._default_executor
|
||||
if executor is None:
|
||||
executor = concurrent.futures.ThreadPoolExecutor(_MAX_WORKERS)
|
||||
executor = concurrent.futures.ThreadPoolExecutor()
|
||||
self._default_executor = executor
|
||||
return futures.wrap_future(executor.submit(func, *args), loop=self)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue