EffectfulVar

turbolift.io.EffectfulVar
See theEffectfulVar companion object
sealed trait EffectfulVar[A, U <: IO] extends Get[A, U], Put[A, U]

Variable writable once.

Similar to OnceVar. Starts as empty. Any get operation blocks until put happens.

Unlike OnceVar, EffectfulVar stores effectful value: see Zipper.

Stored effects U are absorbed by the first fiber that performs get operation. Subsequent fibers that perform gets only receive pure A value, or Broken effect if none exists.

Attributes

Companion
object
Graph
Supertypes
trait Put[A, U]
trait Get[A, U]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

final def asGet: Get[A, U]
final def asPut: Put[A, U]

Inherited methods

final def get: Computation[A, U & Broken]

Attributes

Inherited from:
Get
final def getOption: Computation[Option[A], U]

Attributes

Inherited from:
Get
final def getOrCancel: Computation[A, U]

Attributes

Inherited from:
Get
final def getOrElse(e: => Nothing): Computation[A, U]

Attributes

Inherited from:
Get
final def put(zipper: Zipper[A, U]): Computation[Unit, IO]

Attributes

Inherited from:
Put
final def tryPut(zipper: Zipper[A, U]): Computation[Boolean, IO]

Attributes

Inherited from:
Put

Inherited and Abstract methods

def unsafeTryPut(zipper: Zipper[A, U]): Boolean

Attributes

Inherited from:
Put