DequeueSource

cats.effect.std.DequeueSource
See theDequeueSource companion object
trait DequeueSource[F[_], A] extends QueueSource[F, A]

Attributes

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

Members list

Concise view

Value members

Abstract methods

def takeBack: F[A]

Dequeues an element from the back of the dequeue, possibly fiber blocking until an element becomes available.

Dequeues an element from the back of the dequeue, possibly fiber blocking until an element becomes available.

Attributes

Source:
Dequeue.scala
def takeFront: F[A]

Dequeues an element from the front of the dequeue, possibly semantically blocking until an element becomes available.

Dequeues an element from the front of the dequeue, possibly semantically blocking until an element becomes available.

Attributes

Source:
Dequeue.scala
def tryTakeBack: F[Option[A]]

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

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

Attributes

Returns:

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

Source:
Dequeue.scala
def tryTakeFront: F[Option[A]]

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

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

Attributes

Returns:

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

Source:
Dequeue.scala

Concrete methods

override def take: F[A]

Alias for takeFront in order to implement Queue

Alias for takeFront in order to implement Queue

Attributes

Definition Classes
Source:
Dequeue.scala
override def tryTake: F[Option[A]]

Alias for tryTakeFront in order to implement Queue

Alias for tryTakeFront in order to implement Queue

Attributes

Definition Classes
Source:
Dequeue.scala
def tryTakeBackN(maxN: Option[Int])(implicit F: Monad[F]): F[List[A]]

Attempts to dequeue elements from the back of the dequeue, if they available without semantically blocking. This is a convenience method that recursively runs tryTakeBack. It does not provide any additional performance benefits.

Attempts to dequeue elements from the back of the dequeue, if they available without semantically blocking. This is a convenience method that recursively runs tryTakeBack. It does not provide any additional performance benefits.

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:
Dequeue.scala
def tryTakeFrontN(maxN: Option[Int])(implicit F: Monad[F]): F[List[A]]

Attempts to dequeue elements from the front of the dequeue, if they available without semantically blocking. This is a convenience method that recursively runs tryTakeFront. It does not provide any additional performance benefits.

Attempts to dequeue elements from the front of the dequeue, if they available without semantically blocking. This is a convenience method that recursively runs tryTakeFront. It does not provide any additional performance benefits.

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:
Dequeue.scala

Inherited methods

def size: F[Int]

Attributes

Inherited from:
QueueSource
Source:
Queue.scala
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

Inherited from:
QueueSource
Source:
Queue.scala