mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-02-13 17:40:05 +00:00
![Jonathan Coates](/assets/img/avatar_default.png)
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