cpython/Lib/concurrent/futures
Sam Gross 4256847190
[3.12] gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (GH-125492) (#125599)
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`.
(cherry picked from commit 760872efec)
2024-10-16 14:03:32 -04:00
..
__init__.py [3.12] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123) (#120274) 2024-06-08 16:28:21 +00:00
_base.py gh-95166: cancel map waited on future on timeout (GH-95169) 2022-07-28 11:20:10 +02:00
process.py [3.12] gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (GH-125492) (#125599) 2024-10-16 14:03:32 -04:00
thread.py [3.12] gh-102024: Reduced _idle_semaphore.release calls (GH-102025) (#104959) 2023-05-26 06:21:15 +00:00