Queue

object Queue
Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

final class InPartiallyApplied[G[_]](val G: Sync[G]) extends AnyVal

Value members

Concrete methods

def bounded[F[_], A](maxSize: Int)(F: Concurrent[F]): F[Queue[F, A]]

Creates a queue with the specified size bound.

Creates a queue with the specified size bound.

def boundedNoneTerminated[F[_], A](maxSize: Int)(F: Concurrent[F]): F[NoneTerminatedQueue[F, A]]

Creates a bounded queue terminated by enqueueing None. All elements before None are preserved.

Creates a bounded queue terminated by enqueueing None. All elements before None are preserved.

def circularBuffer[F[_], A](maxSize: Int)(F: Concurrent[F]): F[Queue[F, A]]

Creates a queue which stores the last maxSize enqueued elements and which never blocks on enqueue.

Creates a queue which stores the last maxSize enqueued elements and which never blocks on enqueue.

def circularBufferNoneTerminated[F[_], A](maxSize: Int)(F: Concurrent[F]): F[NoneTerminatedQueue[F, A]]

Creates a queue terminated by enqueueing None. All elements before None are preserved and never blocks on enqueue.

Creates a queue terminated by enqueueing None. All elements before None are preserved and never blocks on enqueue.

def fairBounded[F[_], A](maxSize: Int, fairSize: Int)(F: Concurrent[F]): F[Queue[F, A]]

Created a bounded queue that distributed always at max fairSize elements to any subscriber.

Created a bounded queue that distributed always at max fairSize elements to any subscriber.

def fairUnbounded[F[_], A](fairSize: Int)(F: Concurrent[F]): F[Queue[F, A]]

Creates an unbounded queue that distributed always at max fairSize elements to any subscriber.

Creates an unbounded queue that distributed always at max fairSize elements to any subscriber.

def in[G[_]](G: Sync[G]): InPartiallyApplied[G]

Provides constructors for Queue with state initialized using another Sync datatype.

Provides constructors for Queue with state initialized using another Sync datatype.

This method uses the Partially Applied Type Params technique

 val queue = Queue.in[SyncIO].unbounded[IO, String]
def noneTerminated[F[_], A](F: Concurrent[F]): F[NoneTerminatedQueue[F, A]]

Created an unbounded queue terminated by enqueueing None. All elements before None.

Created an unbounded queue terminated by enqueueing None. All elements before None.

def synchronous[F[_], A](F: Concurrent[F]): F[Queue[F, A]]

Creates a queue which allows at most a single element to be enqueued at any time.

Creates a queue which allows at most a single element to be enqueued at any time.

def synchronousNoneTerminated[F[_], A](F: Concurrent[F]): F[NoneTerminatedQueue[F, A]]

Like synchronous, except that any enqueue of None will never block and cancels any dequeue operation.

Like synchronous, except that any enqueue of None will never block and cancels any dequeue operation.

def unbounded[F[_], A](F: Concurrent[F]): F[Queue[F, A]]

Creates a queue with no size bound.

Creates a queue with no size bound.