mirror of
https://github.com/python/cpython.git
synced 2025-10-24 23:46:23 +00:00
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`.
This commit is contained in:
parent
d83fcf8371
commit
760872efec
3 changed files with 23 additions and 32 deletions
|
|
@ -0,0 +1,2 @@
|
|||
Fix deadlock when :class:`concurrent.futures.ProcessPoolExecutor` shuts down
|
||||
concurrently with an error when feeding a job to a worker process.
|
||||
Loading…
Add table
Add a link
Reference in a new issue