SpotDeferred

spot.internals.SpotDeferred
See theSpotDeferred companion object
final class SpotDeferred[A, U <: IO] extends Deferred[Computation, A]

Attributes

Companion
object
Graph
Supertypes
class Deferred[Computation, A]
trait DeferredSink[Computation, A]
trait DeferredSource[Computation, A]
trait Serializable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def complete(a: A): Computation[Boolean, U]

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

Definition Classes
DeferredSink
override def get: Computation[A, U]

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

Definition Classes
DeferredSource
override def tryGet: Computation[Option[A], U]

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

Definition Classes
DeferredSource

Inherited methods

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

Modify the context F using transformation f.

Modify the context F using transformation f.

Attributes

Inherited from:
Deferred