Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
71d653f0
Commit
71d653f0
authored
Oct 21, 2016
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #26796: Don't configure the number of workers for default threadpool executor.
Initial patch by Hans Lawrenz.
parent
b7273fe7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-eventloop.rst
+7
-0
Lib/asyncio/base_events.py
Lib/asyncio/base_events.py
+1
-4
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Doc/library/asyncio-eventloop.rst
View file @
71d653f0
...
...
@@ -670,6 +670,13 @@ pool of processes). By default, an event loop uses a thread pool executor
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`.
...
...
Lib/asyncio/base_events.py
View file @
71d653f0
...
...
@@ -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
...
...
@@ -616,7 +613,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
)
...
...
Misc/NEWS
View file @
71d653f0
...
...
@@ -402,6 +402,10 @@ Library
children
are
done
.
Patch
by
Johannes
Ebke
.
-
Issue
#
26796
:
Don
't configure the number of workers for default
threadpool executor.
Initial patch by Hans Lawrenz.
IDLE
----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment