Mojo package
atomic
Atomic operations and consistency models.
The atomic package provides the Atomic type for performing atomic
read-modify-write operations on scalar values, along with the Consistency
type for specifying the memory consistency model of those operations. It also
exposes the fence function to create standalone memory barriers.
Use this package when implementing lock-free data structures, reference counting, or any other synchronization primitive that requires fine-grained control over memory ordering between threads.
Modules
-
atomic: Implements theAtomicstruct.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!