Ref

zio.Ref$
See theRef companion class
object Ref extends Serializable

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Ref.type

Members list

Concise view

Type members

Classlikes

abstract class Synchronized[A] extends Ref[A]

A Ref.Synchronized is a purely functional description of a mutable reference. The fundamental operations of a Ref.Synchronized are set and get. set sets the reference to a new value. get gets the current value of the reference.

A Ref.Synchronized is a purely functional description of a mutable reference. The fundamental operations of a Ref.Synchronized are set and get. set sets the reference to a new value. get gets the current value of the reference.

Unlike an ordinary Ref, a Ref.Synchronized allows performing effects within update operations, at some cost to performance. Writes will semantically block other writers, while multiple readers can read simultaneously.

Attributes

Companion:
object
Graph
Supertypes
class Ref[A]
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object unsafe

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
unsafe.type

Value members

Concrete methods

def make[A](a: => A)(implicit trace: Trace): UIO[Ref[A]]

Creates a new Ref with the specified value.

Creates a new Ref with the specified value.

Attributes