Queue
trait Queue[F <: ([_$7] =>> Any), A] extends Enqueue[F, A] with Dequeue1[F, A] with DequeueChunk1[F, Id, A] with Dequeue[F, A]
A queue of elements. 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 (be delayed asynchronously) until there is an offsetting dequeue.
implementations, but may be 'semantically' blocking. For instance,
a queue may have a bound on its size, in which case enqueuing may
block (be delayed asynchronously) until there is an offsetting dequeue.
- Companion
- object
Value members
Methods
Inherited methods
Enqueues one element to this
If the queue is
Queue
.If the queue is
full
this waits until queue has space.This completes after
a
has been successfully enqueued to this Queue
- Inhertied from
- Enqueue
Offers one element to this
Queue
.Evaluates to
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.- Value Params
- a
-
A
to enqueue
- Inhertied from
- Enqueue
Dequeues one
Chunk[A]
with no more than maxSize
elements. Completes once one is ready.- Inhertied from
- DequeueChunk1
Tries to dequeue a single chunk of no more than
Unlike
instead,
max size
elements.Unlike
dequeueChunk1
, this method does not semantically block until a chunk is available -instead,
None
is returned immediately.- Inhertied from
- DequeueChunk1
Provides a pipe that converts a stream of batch sizes in to a stream of elements by dequeuing
batches of the specified size.
batches of the specified size.
- Inhertied from
- Dequeue
Enqueues each element of the input stream to this queue by
calling
calling
enqueue1
on each element.- Inhertied from
- Enqueue
Dequeues elements from the queue, ensuring elements are dequeued in chunks not exceeding
maxSize
.- Inhertied from
- Dequeue
Tries to dequeue a single element. Unlike
block until a chunk is available - instead,
dequeue1
, this method does not semanticallyblock until a chunk is available - instead,
None
is returned immediately.- Inhertied from
- Dequeue1