Atomic types provide thread-safety, and are generally not expected to be constants. Using a Atomic type as a const value is redundant as non-mutable references to shared value are already thread-safe. Consider either changing const to static or dropping the use of Atomic.
If this is meant to be used as a default initial value, consider constructing them from
non-atomic values, using the Atomic::new
or by default type conversion
for Integer types.
const GLOBAL_THREAD_COUNT: AtomicUsize = AtomicUsize::new(0);
static GLOBAL_THREAD_COUNT: AtomicUsize = AtomicUsize::new(0);