TxnVar

ai.entrolution.bengal.stm.model.TxnVar
See theTxnVar companion object
case class TxnVar[F[_], T](id: TxnVarId, value: Ref[F, T], commitLock: Semaphore[F])

A mutable transactional variable holding a single value of type T.

TxnVar instances are created outside the Txn monad via TxnVar.of and then read/written within transactions using the syntax extensions provided by the STM implicit class or bengal.stm.syntax.all._.

Type parameters

F

the effect type

T

the value type

Attributes

Companion
object
Source
TxnVar.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product