Queue

@deprecated("Use cats.effect.std.Queue instead", "3.0.0") 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.
Companion
object
trait Dequeue[F, A]
trait DequeueChunk1[F, Id, A]
trait Dequeue1[F, A]
trait Enqueue[F, A]
class Object
trait Matchable
class Any

Value members

Methods

def imap[B](f: A => B)(g: B => A)(F: Functor[F]): Queue[F, B]
Returns an alternate view of this Queue where its elements are of type B,
given two functions, A => B and B => A.

Inherited methods

def offer1(a: A): F[Boolean]
Offers one element to 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.
Value Params
a
A to enqueue
Inhertied from
Enqueue
def dequeueBatch: (F, Int) => A
Provides a pipe that converts a stream of batch sizes in to a stream of elements by dequeuing
batches of the specified size.
Inhertied from
Dequeue
def dequeueChunk(maxSize: Int): Stream[F, A]
Dequeues elements from the queue, ensuring elements are dequeued in chunks not exceeding maxSize.
Inhertied from
Dequeue
def dequeueChunk1(maxSize: Int): F[G[Chunk[A]]]
Dequeues one Chunk[A] with no more than maxSize elements. Completes once one is ready.
Inhertied from
DequeueChunk1
def enqueue1(a: A): F[Unit]
Enqueues one element to this 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
def dequeue1: F[A]
Dequeues one A from this queue. Completes once one is ready.
Inhertied from
Dequeue1
def dequeue: Stream[F, A]
Dequeues elements from the queue.
Inhertied from
Dequeue
def tryDequeue1: F[Option[A]]
Tries to dequeue a single element. Unlike dequeue1, this method does not semantically
block until a chunk is available - instead, None is returned immediately.
Inhertied from
Dequeue1
def enqueue: (F, A) => Unit
Enqueues each element of the input stream to this queue by
calling enqueue1 on each element. Emits a unit for each element enqueued.
Inhertied from
Enqueue
def tryDequeueChunk1(maxSize: Int): F[Option[G[Chunk[A]]]]
Tries to dequeue a single chunk of no more than max size elements.
Unlike dequeueChunk1, this method does not semantically block until a chunk is available -
instead, None is returned immediately.
Inhertied from
DequeueChunk1