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.
Like dequeue1 but provides a way to cancel the dequeue.
Like dequeueBatch1 but provides a way to cancel the dequeue.
Dequeues one A from this queue.
Dequeues one A from this queue. Completes once one is ready.
Dequeues at most batchSize As from this queue.
Dequeues at most batchSize As 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.
Like dequeue1 but limits the amount of time spent waiting for an element to be dequeued.
Like dequeue1 but limits the amount of time spent waiting for an element
to be dequeued. If the element is dequeued before the timeout is reached, the
element is returned wrapped in Some. Otherwise, None is returned.
Like dequeueBatch1 but limits the amount of time spent waiting for a batch to be dequeued.
Like dequeueBatch1 but limits the amount of time spent waiting for a batch
to be dequeued. If the batch is dequeued before the timeout is reached, the
batch is returned wrapped in Some. Otherwise, None is returned.
Like enqueue1 but limits the amount of time spent waiting for the enqueue to complete.
Like enqueue1 but limits the amount of time spent waiting for the enqueue to complete. If the element is enqueued before the timeout is reached, true is returned. Otherwise, false is returned.
Like peek1 but returns None if waiting for the
element would need longer time than timeout.
The size bound on the queue.
The size bound on the queue. None if the queue is unbounded.
Repeatedly calls dequeue1 forever.
Calls dequeueBatch1 forever, with a bound of Int.MaxValue
Calls dequeueBatch1 once with a provided bound on the elements dequeued.
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.