Deferred

object Deferred
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[F[_], A](F: Concurrent[F]): F[Deferred[F, A]]

Creates an unset promise. *

Creates an unset promise. *

def in[F[_], G[_], A](F: Sync[F], G: Concurrent[G]): F[Deferred[G, A]]

Like apply but initializes state using another effect constructor

Like apply but initializes state using another effect constructor

def tryable[F[_], A](F: Concurrent[F]): F[TryableDeferred[F, A]]

Creates an unset tryable promise. *

Creates an unset tryable promise. *

def tryableUncancelable[F[_], A](F: Async[F]): F[TryableDeferred[F, A]]

Creates an unset tryable promise that only requires an Async and does not support cancellation of get.

Creates an unset tryable promise that only requires an Async and does not support cancellation of get.

def uncancelable[F[_], A](F: Async[F]): F[Deferred[F, A]]

Creates an unset promise that only requires an Async and does not support cancellation of get.

Creates an unset promise that only requires an Async and does not support cancellation of get.

WARN: some Async data types, like IO, can be cancelable, making uncancelable values unsafe. Such values are only useful for optimization purposes, in cases where the use case does not require cancellation or in cases in which an F[_] data type that does not support cancellation is used.

def uncancelableIn[F[_], G[_], A](F: Sync[F], G: Async[G]): F[Deferred[G, A]]

Like uncancelable but initializes state using another effect constructor

Like uncancelable but initializes state using another effect constructor

def unsafe[F[_], A](`evidence$1`: Concurrent[F]): Deferred[F, A]

Like apply but returns the newly allocated promise directly instead of wrapping it in F.delay. This method is considered unsafe because it is not referentially transparent -- it allocates mutable state.

Like apply but returns the newly allocated promise directly instead of wrapping it in F.delay. This method is considered unsafe because it is not referentially transparent -- it allocates mutable state.

def unsafeUncancelable[F[_], A](`evidence$2`: Async[F]): Deferred[F, A]

Like uncancelable but returns the newly allocated promise directly instead of wrapping it in F.delay. This method is considered unsafe because it is not referentially transparent -- it allocates mutable state.

Like uncancelable but returns the newly allocated promise directly instead of wrapping it in F.delay. This method is considered unsafe because it is not referentially transparent -- it allocates mutable state.

WARN: read the caveats of uncancelable.