cpython/Lib/concurrent/futures
Sam Gross 760872efec
gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (#125492)
There was a deadlock when `ProcessPoolExecutor` shuts down at the same
time that a queueing thread handles an error processing a task.

Don't use `_shutdown_lock` to protect the `_ThreadWakeup` pipes -- use
an internal lock instead. This fixes the ordering deadlock where the
`ExecutorManagerThread` holds the `_shutdown_lock` and joins the
queueing thread, while the queueing thread is attempting to acquire the
`_shutdown_lock` while closing the `_ThreadWakeup`.
2024-10-16 11:39:17 -04:00
..
__init__.py gh-120121: Add InvalidStateError to concurrent.futures.__all__ (#120123) 2024-06-08 21:41:19 +05:30
_base.py gh-120157: Remove unused code in concurrent.future (gh-120187) 2024-06-07 16:39:19 +09:00
process.py gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (#125492) 2024-10-16 11:39:17 -04:00
thread.py gh-109649: Use os.process_cpu_count() (#110165) 2023-10-01 03:14:57 +02:00