Closed helsaawy closed 2 months ago
Per Go documentation recommendation (e.g. link), use the atomic types and their associated methods instead of the atomic.Add*/.Store* functions.
atomic
atomic.Add*
.Store*
This makes the intent for atomic access clearer, prevents (accidental) non-atomic access, and (for boolean variables) simplifies code.
Per Go documentation recommendation (e.g. link), use the
atomic
types and their associated methods instead of theatomic.Add*
/.Store*
functions.This makes the intent for atomic access clearer, prevents (accidental) non-atomic access, and (for boolean variables) simplifies code.