The OpenD Programming Language

Atomic.exchange

Atomically replaces the underlying value with a desired value (a read-modify-write operation). Memory is affected according to the value of order.

struct Atomic(T)
pure nothrow @nogc
T
exchange
()

Parameters

newVal T

The new desired value

Return Value

Type: T

The atomic value BEFORE the exchange

Meta