Returns the available number of entries in the queue.
Returns the available number of entries in the queue.
Always Int.MaxValue
when the queue is unbounded.
Repeatedly calls dequeue1
forever.
Dequeues one A
from this queue.
Dequeues one A
from this queue. Completes once one is ready.
Calls dequeueBatch1
once with a provided bound on the elements dequeued.
Dequeues at most batchSize
A
s from this queue.
Dequeues at most batchSize
A
s from this queue. Completes once at least one value is ready.
Enqueues one element in this Queue
.
Enqueues one element in this Queue
.
If the queue is full
this waits until queue is empty.
This completes after a
has been successfully enqueued to this Queue
Returns true
when the queue has reached its upper size bound.
Returns true
when the queue has reached its upper size bound.
Always false
when the queue is unbounded.
Offers one element in this Queue
.
Offers one element in this Queue
.
Evaluates to false
if the queue is full, indicating the a
was not queued up.
Evaluates to true
if the a
was queued up successfully.
A
to enqueue
Returns the element which would be dequeued next, but without removing it.
Returns the element which would be dequeued next, but without removing it. Completes when such an element is available.
The time-varying size of this Queue
.
The time-varying size of this Queue
. This signal refreshes
only when size changes. Offsetting enqueues and de-queues may
not result in refreshes.
The size bound on the queue.
The size bound on the queue. None
if the queue is unbounded.
Calls dequeueBatch1
forever, with a bound of Int.MaxValue
Enqueues each element of the input stream to this Queue
by
calling enqueue1
on each element.
Returns an alternate view of this Queue
where its elements are of type B
,
given two functions, A => B
and B => A
.
Asynchronous queue interface. Operations are all nonblocking in their implementations, but may be 'semantically' blocking. For instance, a queue may have a bound on its size, in which case enqueuing may block until there is an offsetting dequeue.