Atomic.cas

Compare and swap

  1. bool cas(T oldVal, T newVal)
    struct Atomic(T)
    shared
    bool
    cas
    (
    MemoryOrder mo = MemoryOrder.seq
    MemoryOrder fmo = MemoryOrder.seq
    )
    if (
    __traits(isIntegral, T) ||
    isPointer!T
    )
  2. bool casWeak(T oldVal, T newVal)

Meta