class

BoolChannel::StateChannel::EndlessQueue

Inherits Deque < Indexable::Mutable < Indexable < Enumerable < Iterable < Reference < Object

Instance methods

empty=(empty : Bool)
Source
empty?

Returns true if self is empty, false otherwise.

([] of Int32).empty? # => true
([1]).empty?         # => false
Source
push(value : T)

Adds an item to the end of the deque.

a = Deque{1, 2}
a.push 3 # => Deque{1, 2, 3}
Source
shift

Removes and returns the first item, if not empty, otherwise executes the given block and returns its value.

Source