The OpenD Programming Language

Atomic.opOpAssign

Atomically replaces the current value with the result of computation involving the previous value and val. The operation is read-modify-write operation.

operator += performs atomic addition. Equivalent to return fetchAdd(arg) + arg;. operator -= performs atomic subtraction. Equivalent to return fetchSub(arg) - arg;. operator &= performs atomic bitwise and. Equivalent to return fetchAnd(arg) & arg;. operator |= performs atomic bitwise or. Equivalent to return fetchOr(arg) | arg;. operator ^= performs atomic bitwise exclusive or. Equivalent to return fetchXor(arg) ^ arg;.

struct Atomic(T)
pure nothrow @nogc
T
opOpAssign
(
string op
)
(
T val
)

Parameters

val T

value to perform the operation with

Return Value

Type: T

The atomic value AFTER the operation

Meta