-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlock when adding/removing observers
When adding/removing observers, we locked on the observer, then acquired the global lock. When a metric is observed, then we acquire the global lock and then the observer lock. If these happen at the same time, we can easily end up with a deadlock. We simply avoid holding the observer lock for the entire add/remove process (instead only locking when actually needed). Closes #1639
- Loading branch information
Showing
2 changed files
with
24 additions
and
16 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