[New-bugs-announce] [issue26796] BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor

Hans Lawrenz report at bugs.python.org
Mon Apr 18 10:43:59 EDT 2016


New submission from Hans Lawrenz:

In issue 21527 <http://bugs.python.org/issue21527> the concurrent.futures.ThreadPoolExecutor was changed to have a default value for max_workers. When asyncio.base_events.BaseEventLoop.run_in_executor creates a default ThreadPoolExecutor it specifies a value of 5 for max_workers, presumably because at the time it was written ThreadPoolExecutor didn't have a default for max_workers. This is confusing because on reading the documentation for ThreadPoolExecutor one might assume that the default specified there is what will be used if a default executor isn't supplied via BaseEventLoop.set_default_executor.

I propose that BaseEventLoop.run_in_executor be changed to not supply a default for max_workers. If this isn't acceptable, a note ought to be put in the run_in_executor documentation.

----------
components: asyncio
files: run_in_executor_max_workers.patch
keywords: patch
messages: 263669
nosy: Hans Lawrenz, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: BaseEventLoop.run_in_executor shouldn't specify max_workers for default Executor
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42506/run_in_executor_max_workers.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26796>
_______________________________________


More information about the New-bugs-announce mailing list