Fantom

 

const final class

concurrent::AtomicBool

sys::Obj
  concurrent::AtomicBool

AtomicBool is used to manage a boolean variable shared between actor/threads with atomic updates.

Slots

compareAndSetSource

native 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.

getAndSetSource

native Bool getAndSet(Bool val)

Atomically set the value and return the previous value.

makeSource

new make(Bool val := false)

Construct with initial value

toStrSource

override Str toStr()

Overrides sys::Obj.toStr

Return val.toStr

valSource

native Bool val

The current boolean value