1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-02-10 08:00:05 +00:00
Jonathan Coates eb3e8ba677
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
2023-12-01 12:33:03 +00:00
..
2023-10-28 17:58:11 +01:00