Deferred

object Deferred
Companion:
class
Source:
Deferred.scala
class Object
trait Matchable
class Any

Type members

Classlikes

final class AsyncDeferred[F[_], A](implicit F: Async[F]) extends Deferred[F, A]

Value members

Concrete methods

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

Creates an unset Deferred. Every time you bind the resulting F, a new Deferred is created. If you want to share one, pass it as an argument and flatMap once.

Creates an unset Deferred. Every time you bind the resulting F, a new Deferred is created. If you want to share one, pass it as an argument and flatMap once.

Source:
Deferred.scala
def in[F[_], G[_], A](implicit F: Sync[F], G: Async[G]): F[Deferred[G, A]]

Like apply but initializes state using another effect constructor

Like apply but initializes state using another effect constructor

Source:
Deferred.scala
def unsafe[F[_] : Async, A]: Deferred[F, A]

Like apply but returns the newly allocated Deferred directly instead of wrapping it in F.delay. This method is considered unsafe because it is not referentially transparent -- it allocates mutable state. In general, you should prefer apply and use flatMap to get state sharing.

Like apply but returns the newly allocated Deferred directly instead of wrapping it in F.delay. This method is considered unsafe because it is not referentially transparent -- it allocates mutable state. In general, you should prefer apply and use flatMap to get state sharing.

Source:
Deferred.scala

Implicits

Implicits

implicit def catsInvariantForDeferred[F[_] : Functor]: Invariant[[_] =>> Deferred[F, _$9]]