QueueSource

trait QueueSource[F[_], A]
Companion:
object
Source:
Queue.scala
class Object
trait Matchable
class Any
trait DequeueSource[F, A]
trait Dequeue[F, A]
class Queue[F, A]

Value members

Abstract methods

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

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.

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.

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

Source:
Queue.scala