Atomic in std::sync::atomic - Rust
Description: A memory location which can be safely modified from multiple threads.

## Atomic

# Type Alias Atomic

Source

    pub type Atomic<T> = <T as AtomicPrimitive>::AtomicInner;

🔬This is a nightly-only experimental API. (`generic_atomic` #130539)
Expand description

A memory location which can be safely modified from multiple threads.

This has the same size and bit validity as the underlying type `T`. However, the alignment of this type is always equal to its size, even on targets where `T` has alignment less than its size.

For more about the differences between atomic types and non-atomic types as well as information about the portability of this type, please see the module-level documentation.

Note: This type is only available on platforms that support atomic loads and stores of `T`.