Backpressure

cats.effect.std.Backpressure
See theBackpressure companion object
trait Backpressure[F[_]]

Utility to apply backpressure semantics to the execution of an Effect. Backpressure instances will apply a Backpressure.Strategy to the execution where each strategy works as follows:

Backpressure.Strategy.Lossy will mean that effects will not be run in the presence of backpressure, meaning the result will be None

Backpressure.Strategy.Lossless will mean that effects will run in the presence of backpressure, meaning the effect will semantically block until backpressure is alleviated

Attributes

Companion:
object
Source:
Backpressure.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def metered[A](f: F[A]): F[Option[A]]

Applies rate limiting to an effect based on backpressure semantics

Applies rate limiting to an effect based on backpressure semantics

Attributes

f

the effect that backpressure is applied to

Returns:

an Option where Option denotes if the effect was run or not according to backpressure semantics

Source:
Backpressure.scala