DequeueSource

trait DequeueSource[F[_], A] extends QueueSource[F, A]
Companion:
object
trait QueueSource[F, A]
class Object
trait Matchable
class Any
trait Dequeue[F, A]

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.

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.

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.

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

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.

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

Concrete methods

override def take: F[A]

Alias for takeFront in order to implement Queue

Alias for takeFront in order to implement Queue

Definition Classes
override def tryTake: F[Option[A]]

Alias for tryTakeFront in order to implement Queue

Alias for tryTakeFront in order to implement Queue

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

Dequeues an element from the front of the dequeue, possibly fiber blocking until an element becomes available. 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.

Dequeues an element from the front of the dequeue, possibly fiber blocking until an element becomes available. 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.

Value parameters:
maxN

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

Returns:

an effect that contains the dequeued elements

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.

Value parameters:
maxN

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

Returns:

an effect that contains the dequeued elements

Inherited methods

def size: F[Int]
Inherited from:
QueueSource
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.

Value parameters:
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