Ref

dev.tauri.choam.refs.Ref
See theRef companion object
sealed trait Ref[A] extends RefLike[A]

A mutable memory location with a pure API and composable lock-free operations.

Ref is similar to java.util.concurrent.atomic.AtomicReference or cats.effect.kernel.Ref, but its operations are Rxns. Thus, operations on a Ref are composable with other Rxns.

Attributes

Companion
object
Source
Ref.scala
Graph
Supertypes
trait RefLike[A]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

final override def get: Axn[A]

Attributes

Definition Classes
Source
Ref.scala
final override def toCats[F[_]](implicit F: Reactive[F]): Ref[F, A]

Attributes

Definition Classes
Source
Ref.scala
final def unsafeCas(ov: A, nv: A): Axn[Unit]

Attributes

Source
Ref.scala
final def unsafeDirectRead: Axn[A]

Attributes

Source
Ref.scala
final def unsafeTicketRead: Axn[Ticket[A]]

Attributes

Source
Ref.scala
final override def upd[B, C](f: (A, B) => (A, C)): Rxn[B, C]

Attributes

Definition Classes
Source
Ref.scala
final override def updWith[B, C](f: (A, B) => Axn[(A, C)]): Rxn[B, C]

Attributes

Definition Classes
Source
Ref.scala

Inherited methods

final def getAndSet: Rxn[A, A]

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def getAndUpdate(f: A => A): Axn[A]

Returns previous value

Returns previous value

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def getAndUpdateWith(f: A => Axn[A]): Axn[A]

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def modify[B](f: A => (A, B)): Axn[B]

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def modifyWith[B](f: A => Axn[(A, B)]): Axn[B]

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def set: Rxn[A, Unit]

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def tryModify[B](f: A => (A, B)): Axn[Option[B]]

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def tryUpdate(f: A => A): Axn[Boolean]

Returns false iff the update failed

Returns false iff the update failed

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def update(f: A => A): Axn[Unit]

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def updateAndGet(f: A => A): Axn[A]

Returns new value

Returns new value

Attributes

Inherited from:
RefLike
Source
RefLike.scala
final def updateWith(f: A => Axn[A]): Axn[Unit]

Attributes

Inherited from:
RefLike
Source
RefLike.scala