-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential class initialization deadlocks
By ensuring that nested classes that extend the containing class, and are referenced by the containing class' static initializer, cannot be initialized from outside the containing class. Without this change, deadlocks can occur if the nested and containing classes are initialized by different threads, e.g.: ``` SpawnCache.NO_CACHE // thread 1 new ContainingPackageLookupValue.NoContainingPackage("") // thread 2 ``` or: ``` new NoSpawnCache() // thread 1 ContainingPackageLookupValue.NONE // thread 2 ``` PiperOrigin-RevId: 615919227 Change-Id: I3c513fa349c878cc604d2862a233e33a503c8293
- Loading branch information
1 parent
4efe725
commit 589237b
Showing
3 changed files
with
8 additions
and
2 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