mirror of
https://github.com/python/cpython.git
synced 2026-01-03 14:02:21 +00:00
When shutdown is called with wait=False, the executor thread keeps running even after the ProcessPoolExecutor's state is reset. The executor then tries to replenish the worker processes pool resulting in an error and a potential hang when it comes across a worker that has died. Fixed the issue by having _adjust_process_count() return without doing anything if the ProcessPoolExecutor's state has been reset. Added unit tests to validate two scenarios: max_workers < num_tasks (exception) max_workers > num_tasks (exception + hang) |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| executor.py | ||
| test_as_completed.py | ||
| test_deadlock.py | ||
| test_future.py | ||
| test_init.py | ||
| test_interpreter_pool.py | ||
| test_process_pool.py | ||
| test_shutdown.py | ||
| test_thread_pool.py | ||
| test_wait.py | ||
| util.py | ||