-
-
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.
lib/model: Use a single lock (#9275)
I'm tired of the fmut/pmut shenanigans. This consolidates both under one lock; I'm not convinced there are any significant performance differences with this approach since we're literally just protecting map juggling... - The locking goes away when we were already under an appropriate fmut lock. - Where we had fmut.RLock()+pmut.Lock() it gets upgraded to an fmut.Lock(). - Otherwise s/pmut/fmut/. In order to avoid diff noise for an important change I did not do the following cleanups, which will be filed in a PR after this one, if accepted: - Renaming fmut to just mut - Renaming methods that refer to being "PRLocked" and stuff like that - Removing the no longer relevant deadlock detector - Comments referring to pmut and locking sequences...
- Loading branch information
Showing
2 changed files
with
48 additions
and
71 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
Oops, something went wrong.