Atomic::Ordering
Inherits Enum / Comparable / Value / Object
Specifies how memory accesses, including non atomic, are to be reordered around atomics. Follows the C/C++ semantics: https://en.cppreference.com/w/c/atomic/memory_order.
By default atomics use the sequentially consistent ordering, which has the strongest guarantees. If all you need is to increment a counter, a relaxed ordering may be enough. If you need to synchronize access to other memory (e.g. locks) you may try the acquire/release semantics that may be faster on some architectures (e.g. X86) but remember that an acquire must be paired with a release for the ordering to be guaranteed.
The code generation always enforces the selected memory order, even on weak CPU architectures (e.g. ARM32), with the exception of the Relaxed memory order where only the operation itself is atomic.