const class std::AtomicBool
sys::Obj std::AtomicBool
AtomicBool is used to manage a boolean variable shared between actor/threads with atomic updates.
- compareAndSet
-
Bool compareAndSet(Bool expect, Bool update)
Atomically set the value to
update
if current value is equivalent to theexpect
value. Return true if updated, or false if current value was not equal to the expected value. - getAndSet
-
Atomically set the value and return the previous value.
- make
-
new make(Bool val := false)
Construct with initial value
- toStr
-
virtual override Str toStr()
Return
val.toStr
- val
-
Bool val
The current boolean value