Async::Queue(T)
Inherits Enumerable / Reference / Object
First in, first out (FIFO) queue based on Python's own asyncio.Queue.
Constructors
new(max_size : Int32 | Nil = nil)
Initializes a new Queue.
If max_size is less than or equal to zero, the queue size is infinite.
If it is an integer greater than 0, then await #put blocks when the queue
reaches max_size until an item is removed by #get.
Instance methods
get
Remove and return an item from the queue. If the queue is empty, wait until an item is available.
get_sync
Remove and return an item from the queue. If the queue is empty, wait until an item is available.
push!(item : T)
Put an item into the queue without blocking. If no free slot is
immediately available, raise QueueFullError.
put(item : T)
Put an item into the queue. If the queue is full, wait until a free slot is available before adding the item.
put_sync(item : T)
Source