PQueueSink

trait PQueueSink[F[_], A]
Companion:
object
Source:
PQueue.scala
class Object
trait Matchable
class Any
class PQueue[F, A]

Value members

Abstract methods

def offer(a: A): F[Unit]

Enqueues the given element, possibly fiber blocking until sufficient capacity becomes available.

Enqueues the given element, possibly fiber blocking until sufficient capacity becomes available.

O(log(n))

Value parameters:
a

the element to be put in the PQueue

Source:
PQueue.scala
def tryOffer(a: A): F[Boolean]

Attempts to enqueue the given element without fiber blocking.

Attempts to enqueue the given element without fiber blocking.

O(log(n))

Value parameters:
a

the element to be put in the PQueue

Returns:

an effect that describes whether the enqueuing of the given element succeeded without blocking

Source:
PQueue.scala

Concrete methods

def tryOfferN(list: List[A])(implicit F: Monad[F]): F[List[A]]

Attempts to enqueue the given elements without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Attempts to enqueue the given elements without semantically blocking. If an item in the list cannot be enqueued, the remaining elements will be returned. This is a convenience method that recursively runs tryOffer and does not offer any additional performance benefits.

Value parameters:
list

the elements to be put in the PQueue

Returns:

an effect that contains the remaining valus that could not be offered.

Source:
PQueue.scala