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 <rep...@bugs.python.org> <http://bugs.python.org/issue26796> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com