SIGN IN SIGN UP

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`.
S
Sam Gross committed
760872efecb95017db8e38a8eda614bf23d2a22c
Parent: d83fcf8
Committed by GitHub <noreply@github.com> on 10/16/2024, 3:39:17 PM