class

BoolChannel

Inherits Reference < Object

A class which has two channels, one for which a state is true and the other for when the state if false

Constructors

new(value : Bool)
Source

Instance methods

close

Doesn't release fibers in #wait_until_true, they leave through their abort channel

Source
set(value : Bool) : Nil
Source
swap(value : Bool)
Source
value
Source
wait_until_true(turn : Channel(Nil), abort : Channel, &) : Bool

Blocks until the value is true and this fiber is first in line. Only the first is woken, and it wakes the next as it leaves.

Source
when_false
Source
when_true
Source

Nested types