fs2.concurrent
package fs2.concurrent
Type members
Classlikes
object Balance
Provides mechanisms for balancing the distribution of chunks across multiple streams.
trait NoneTerminatedQueue[F <: ([_$13] =>> Any), A] extends Enqueue[F, Option[A]] with Dequeue1[F, Option[A]] with DequeueChunk1[F, [A] =>> Option[A], A] with Dequeue[F, A]
Like Queue, but allows allows signalling of no further enqueues by enqueueing
Optimizes dequeue to minimum possible boxing.
None
.Optimizes dequeue to minimum possible boxing.
@deprecated("Use cats.effect.std.Queue instead", "3.0.0")
trait Queue[F <: ([_$7] =>> Any), A] extends Enqueue[F, A] with Dequeue1[F, A] with DequeueChunk1[F, Id, A] with Dequeue[F, A]
A queue of elements. Operations are all nonblocking in their
implementations, but may be 'semantically' blocking. For instance,
a queue may have a bound on its size, in which case enqueuing may
block (be delayed asynchronously) until there is an offsetting dequeue.
implementations, but may be 'semantically' blocking. For instance,
a queue may have a bound on its size, in which case enqueuing may
block (be delayed asynchronously) until there is an offsetting dequeue.
- Companion
- object
Pure holder of a single value of type
and updated in the effect
A
that can be both readand updated in the effect
F
.The update methods have the same semantics as Ref, as well as
propagating changes to
in case of very fast updates).
propagating changes to
discrete
(with a last-update-wins policyin case of very fast updates).
The
function, in the presence of
need looping even without any other writers.
access
method differs slightly from Ref
in that the updatefunction, in the presence of
discrete
, can return false
andneed looping even without any other writers.
- Companion
- object
Asynchronous Topic.
Topic allows you to distribute
A
published by arbitrary number of publishers to arbitrary number of subscribers.Topic has built-in back-pressure support implemented as maximum bound (
Once that bound is hit, publishing may semantically block until the lagging subscriber consumes some of its queued elements.
maxQueued
) that a subscriber is allowed to enqueue.Once that bound is hit, publishing may semantically block until the lagging subscriber consumes some of its queued elements.
Additionally the subscriber has possibility to terminate whenever size of enqueued elements is over certain size
by using
by using
subscribeSize
.- Companion
- object