QueueSource

cats.effect.std.QueueSource
See theQueueSource companion object
trait QueueSource[F[_], A]

Attributes

Companion:
object
Source:
Queue.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait DequeueSource[F, A]
trait Dequeue[F, A]
class Queue[F, A]

Members list

Concise view

Value members

Abstract methods

def size: F[Int]

Attributes

Source:
Queue.scala
def take: F[A]

Dequeues an element from the front of the queue, possibly fiber blocking until an element becomes available.

Dequeues an element from the front of the queue, possibly fiber blocking until an element becomes available.

Attributes

Source:
Queue.scala
def tryTake: F[Option[A]]

Attempts to dequeue an element from the front of the queue, if one is available without fiber blocking.

Attempts to dequeue an element from the front of the queue, if one is available without fiber blocking.

Attributes

Returns:

an effect that describes whether the dequeueing of an element from the queue succeeded without blocking, with None denoting that no element was available

Source:
Queue.scala

Concrete methods

def tryTakeN(maxN: Option[Int])(implicit F: Monad[F]): F[List[A]]

Attempts to dequeue elements from the front of the queue, if they are available without semantically blocking. This method does not guarantee any additional performance benefits beyond simply recursively calling tryTake, though some implementations will provide a more efficient implementation.

Attempts to dequeue elements from the front of the queue, if they are available without semantically blocking. This method does not guarantee any additional performance benefits beyond simply recursively calling tryTake, though some implementations will provide a more efficient implementation.

Attributes

maxN

The max elements to dequeue. Passing None will try to dequeue the whole queue.

Returns:

an effect that contains the dequeued elements

Source:
Queue.scala