The OpenD Programming Language

Atomic.fetchAdd

Atomically replaces the current value with the result of arithmetic addition of the atomic variable and val. That is, it performs atomic post-increment. The operation is a read-modify-write operation. Memory is affected according to the value of order.

struct Atomic(T)
pure nothrow @nogc
T
fetchAdd
(
T val
)

Parameters

val T

The other argument of arithmetic addition

Return Value

Type: T

The atomic value BEFORE the operation

Meta