-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid holding locks when releasing resources.
We need to lock while updating the various states of the objects that care about resources. We don't need a lock when all we're doing is releasing the resource itself. Previously we fixed a deadlock by adding locks so that locks were always acquired in order. It appears though that we can go the other direction for this particular case and avoid holding any locks, which should also solve the deadlock. If it turns out this doesn't work we can revert this and add another layer of locking when releasing from the memory cache. Ideally though this should provide better performance with too much more complication. Fixes #3795 PiperOrigin-RevId: 260748170
- Loading branch information
1 parent
a0ddfc9
commit 4de2cda
Showing
5 changed files
with
111 additions
and
100 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
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