AsyncDeferred

cats.effect.kernel.Deferred$.AsyncDeferred
final class AsyncDeferred[F[_], A](implicit F: Async[F]) extends Deferred[F, A]

Attributes

Source:
Deferred.scala
Graph
Supertypes
class Deferred[F, A]
trait DeferredSink[F, A]
trait DeferredSource[F, A]
trait Serializable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def complete(a: A): F[Boolean]

If this Deferred is empty, sets the current value to a, and notifies any and all readers currently blocked on a get. Returns true.

If this Deferred is empty, sets the current value to a, and notifies any and all readers currently blocked on a get. Returns true.

If this Deferred has already been completed, returns false.

Satisfies: Deferred[F, A].flatMap(r => r.complete(a) *> r.get) == a.pure[F]

Attributes

Source:
Deferred.scala
def get: F[A]

Obtains the value of the Deferred, or waits until it has been completed. The returned value may be canceled.

Obtains the value of the Deferred, or waits until it has been completed. The returned value may be canceled.

Attributes

Source:
Deferred.scala
def tryGet: F[Option[A]]

Obtains the current value of the Deferred, or None if it hasn't completed.

Obtains the current value of the Deferred, or None if it hasn't completed.

Attributes

Source:
Deferred.scala

Inherited methods

def mapK[G[_]](f: FunctionK[F, G]): Deferred[G, A]

Modify the context F using transformation f.

Modify the context F using transformation f.

Attributes

Inherited from:
Deferred
Source:
Deferred.scala