The atomic module provides basic support for lock-free concurrent programming.
Performs the binary operation 'op' on val using 'mod' as the modifier.
T val
| The target variable. |
V1 mod
| The modifier to apply. |
Stores 'writeThis' to the memory referenced by 'here' if the value referenced by 'here' is equal to 'ifThis'. This operation is both lock-free and atomic.
shared(T)* here
| The address of the destination variable. |
V2 writeThis
| The value to store. |
V1 ifThis
| The comparison value. |
Loads 'val' from memory and returns it. The memory barrier specified by 'ms' is applied to the operation, which is fully sequenced by default. Valid memory orders are MemoryOrder.raw, MemoryOrder.acq, and MemoryOrder.seq.
T val
| The target variable. |
Writes 'newval' into 'val'. The memory barrier specified by 'ms' is applied to the operation, which is fully sequenced by default. Valid memory orders are MemoryOrder.raw, MemoryOrder.rel, and MemoryOrder.seq.
T val
| The target variable. |
V1 newval
| The value to store. |
Specifies the memory ordering semantics of an atomic operation.
Not sequenced.
Hoist-load + hoist-store barrier.
Sink-load + sink-store barrier.
Fully sequenced (acquire + release).
Inserts a full load/store memory fence (on platforms that need it). This ensures that all loads and stores before a call to this function are executed before any loads and stores after the call.
© 1999–2018 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/core_atomic.html