memory ordering
The rule for which other memory changes a thread is guaranteed to see around an atomic operation.
Relaxed guarantees only the atomic itself; Acquire/Release pair up to publish data written before a store; SeqCst adds one global order of all SeqCst operations.
Examples
ready.store(true, Ordering::Release)paired with aready.load(Ordering::Acquire)that seestrueguarantees the reader also sees what was written before the store.
See also