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