We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8cef28a + 4175792 commit 49a9dcdCopy full SHA for 49a9dcd
1 file changed
src/thread/thread.py
@@ -368,9 +368,11 @@ def __init__(
368
369
Raises
370
------
371
+ AssertionError: invalid `dataset`
372
AssertionError: invalid `max_threads`
373
"""
- assert 0 <= max_threads, 'Cannot run a thread pool with max threads set to 0'
374
+ assert len(dataset) > 0, 'dataset cannot be empty'
375
+ assert 0 <= max_threads, 'max_threads cannot be set to 0'
376
377
self._threads = []
378
self._completed = 0
0 commit comments