microsoft / hcsshim

Windows - Host Compute Service Shim
MIT License
576 stars 259 forks source link

Use `atomic` types instead of raw values #2241

Closed helsaawy closed 2 months ago

helsaawy commented 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.

This makes the intent for atomic access clearer, prevents (accidental) non-atomic access, and (for boolean variables) simplifies code.