New submission from Claudiu.Popa:
Due to some bad math on my side, I passed max_workers=0 to
concurrent.futures.ThreadPoolExecutor. This didn't fail properly, but hanged.
The same behaviour occurs in ProcessPoolExecutor, but this time it fails
internally with something like this:
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python34\lib\threading.py", line 921, in _bootstrap_inner
self.run()
File "C:\Python34\lib\threading.py", line 869, in run
self._target(*self._args, **self._kwargs)
File "C:\Python34\lib\concurrent\futures\process.py", line 225, in
_queue_management_worker
assert sentinels
AssertionError
The attached patch checks that *max_workers* is <= 0 and raises ValueError if
so.
----------
components: Library (Lib)
files: futures_max_workers.patch
keywords: patch
messages: 217258
nosy: Claudiu.Popa, bquinlan
priority: normal
severity: normal
status: open
title: concurrent.futures does not validate that max_workers is proper
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file35053/futures_max_workers.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21362>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com