TxnLike

trait TxnLike

This is a minimal trait for any type of transactions that wrap an underlying Scala-STM transaction.

class Object
trait Matchable
class Any
trait Txn[T]
class AnyTxn
trait Txn[T]
trait Txn
trait TxnMixin[T, I1]
trait Txn[T]
trait Txn
trait TxnMixin[T]
trait BasicTxnImpl[T, I1]

Value members

Abstract methods

def afterCommit(code: => Unit): Unit

Registers a thunk to be executed after the transaction successfully committed.

Registers a thunk to be executed after the transaction successfully committed.

def peer: InTxn

Every transaction has a plain Scala-STM transaction as a peer. This comes handy for setting up custom things like TxnLocal, TMap, or calling into the hooks of concurrent.stm.Txn. It is also needed when re-wrapping the transaction of one system into another.

Every transaction has a plain Scala-STM transaction as a peer. This comes handy for setting up custom things like TxnLocal, TMap, or calling into the hooks of concurrent.stm.Txn. It is also needed when re-wrapping the transaction of one system into another.