TxnVarOps

ai.entrolution.bengal.stm.STM.TxnVarOps
implicit class TxnVarOps[V](txnVar: TxnVar[F, V])

Provides transaction operations on TxnVar instances. Automatically available when an STM[F] is implicit.

Attributes

Source
STM.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def get: Txn[V]

Retrieves the current value within a transaction.

Retrieves the current value within a transaction.

Attributes

Source
STM.scala
def modify(f: V => V): Txn[Unit]

Modifies the value by applying a pure function within a transaction.

Modifies the value by applying a pure function within a transaction.

Attributes

Source
STM.scala
def set(newValue: => V): Txn[Unit]

Sets a new value within a transaction.

Sets a new value within a transaction.

Attributes

Source
STM.scala