RWAtomicFlag manages a bit flag (set or cleared) allowing for atomic manipulation of the bit, including providing test-and-set functionality.
- Example
}
Atomically sets and clears a bit flag.
Definition atomicflag.h:69
#define RW_ATOMIC_FLAG_INIT
Definition atomicflag.h:38
bool testAndSet(RWAtomicMemoryOrder order=rw_mem_order_seq_cst)
Definition atomicflag.h:75
void clear(RWAtomicMemoryOrder order=rw_mem_order_seq_cst)
Definition atomicflag.h:95
- Note
- While copy construction and assignment are not prohibited, these operations are not performed in an atomic manner, and may result in undefined behavior. These operations may be prohibited in a future release and should be avoided.