-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multiprocessing: use CriticalLock in a few places
This uses _thread.CriticalLock to prevent garbage collection while modifying the finalizer registry and in the resource tracker. There is a potential deadlock when checking if the resource tracker is running. This exists in upstream CPython, but occurs much more frequently with biased reference counting. The call to _check_alive can trigger a garbage collection that collects a multiprocessing lock. The finalizer for that lock calls back into resource tracker leading to a deadlock. This is rare in upstream CPython because most function calls do not trigger a garbage collection.
- Loading branch information
Showing
3 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters