Atomic.decrement

///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

  1. T decrement()
    template decrement(msync ms = msync.seq)
    version(TangoDoc)
    T
    decrement
    ()
  2. template decrement(msync ms = msync.seq)

Members

Functions

decrement
T decrement()

This operation is only legal for built-in value and pointer types, and is equivalent to an atomic "val = val - 1" operation. This function exists to facilitate use of the optimized decrement instructions provided by some architecures. If no such instruction exists on the target platform then the behavior will perform the operation using more traditional means. This operation is both lock-free and atomic.

Meta