Initialize atomics in metrics, update style guide on atomics

This commit is contained in:
2025-08-29 10:52:26 -04:00
parent 1133d1e365
commit b6d4ae2862
3 changed files with 31 additions and 3 deletions

View File

@@ -58,6 +58,7 @@ private:
// THREAD SAFETY: Each gauge instance has exactly ONE writer thread (the one
// that created it). It is an error to call inc()/dec()/set() from any thread
// other than the creating thread.
// IMPLEMENTATION NOTE: Mutex protection is an internal implementation detail.
struct Gauge {
void inc(double = 1.0); // Increase gauge value - SINGLE WRITER ONLY
void dec(double = 1.0); // Decrease gauge value - SINGLE WRITER ONLY