cpython/Lib/concurrent/futures
Ajay Kamdar 598aa7cc98
gh-132969: Fix error/hang when shutdown(wait=False) and task exited abnormally (GH-133222)
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)
2025-06-10 13:28:31 +02:00
..
__init__.py gh-124694: Add concurrent.futures.InterpreterPoolExecutor (gh-124548) 2024-10-16 16:50:46 -06:00
_base.py gh-134173: optimize state transfer between concurrent.futures.Future and asyncio.Future (#134174) 2025-05-18 21:26:20 +05:30
interpreter.py gh-132775: Use _PyObject_GetXIData (With Fallback) (gh-134440) 2025-05-22 06:50:06 -06:00
process.py gh-132969: Fix error/hang when shutdown(wait=False) and task exited abnormally (GH-133222) 2025-06-10 13:28:31 +02:00
thread.py gh-88110: Clear concurrent.futures.thread._threads_queues after fork to avoid joining parent process' threads (GH-126098) 2024-11-22 18:20:34 +02:00