An atomic is a single value the hardware can read-modify-write without a lock. For a counter, it is dramatically cheaper than Mutex<u64>:
hits.fetch_add(1, Ordering::Relaxed);
compare_exchange is the primitive everything else is built from — set the value only if it currently equals what you expected:
claimed.compare_exchange(false, true, Ordering::AcqRel, Ordering::Acquire)
// Ok(false) — we won, it was false and is now true
// Err(true) — someone else won; the value is what we found
That is how you elect exactly one winner among N threads with no lock at all.
