[Python-checkins] cpython (merge 3.6 -> default): Merge 3.6 (issue #26796)
yury.selivanov
python-checkins at python.org
Fri Oct 21 17:42:08 EDT 2016
https://hg.python.org/cpython/rev/a475f2e39c6f
changeset: 104631:a475f2e39c6f
parent: 104628:f1a154e59323
parent: 104630:99941cacfc38
user: Yury Selivanov <yury at magic.io>
date: Fri Oct 21 17:42:00 2016 -0400
summary:
Merge 3.6 (issue #26796)
files:
Doc/library/asyncio-eventloop.rst | 7 +++++++
Lib/asyncio/base_events.py | 5 +----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -671,6 +671,13 @@
This method is a :ref:`coroutine <coroutine>`.
+ .. versionchanged:: 3.5.3
+ :meth:`BaseEventLoop.run_in_executor` no longer configures the
+ ``max_workers`` of the thread pool executor it creates, instead
+ leaving it up to the thread pool executor
+ (:class:`~concurrent.futures.ThreadPoolExecutor`) to set the
+ default.
+
.. method:: AbstractEventLoop.set_default_executor(executor)
Set the default executor used by :meth:`run_in_executor`.
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -41,9 +41,6 @@
__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 @@
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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list