A CommitBarrier
allows multiple transactions on separate threads to
perform a single atomic commit.
The presence of an implicit InTxn
instance grants the caller permission
to perform transactional reads and writes on Ref
instances, as well as
permission to call object Txn
methods that require an InTxnEnd
.
The presence of an implicit InTxnEnd
instance inside a transaction
life-cycle handler grants permission to call methods in object Txn
that
locate nesting levels or register additional handlers.
MaybeTxn
allows lookup of the implicit InTxn
instance without failing
if the InTxn
is not known at compile time.
A NestingLevel
instance describes a single attempt to execute an atomic
block inside a transaction.
Instances of PendingAtomicBlock
defer the execution of an atomic block
until all of the alternatives can be gathered from the user.
Provides access to a single element of type A.
Provides all of the operations of a Ref[A]
, without the ability to get a
Ref.View
.
Sink[+A]
consists of the contra-variant write-only operations of
Ref[A]
.
Provides all of the operations of a Sink[A]
, without the ability to get
a Sink.View
.
Source[+A]
consists of the covariant read-only operations of Ref[A]
.
Provides all of the operations of a Source[A]
, without the ability to get
a Source.View
.
Bulk transactional storage, roughly equivalent to Array[Ref[T]]
but
potentially much more space efficient.
A transactional map implementation that requires that all of its map-like operations be called from inside an atomic block.
A transactional set implementation that requires that all of its set-like operations be called from inside an atomic block.
This trait implements methods that can be used to examine the content of transactional data structures in a debugger with minimal modification to the behavior of the program.
A TxnExecutor
is responsible for executing atomic blocks transactionally
using a set of configuration parameters.
TxnLocal[A]
holds an instance of A
that is local to an atomic block.
object Ref
contains factory methods that allocate an STM-managed memory
location and return a Ref
instance that provides access to that location.
The Txn
object provides methods that operate on the current transaction
context.
object TxnExecutor
manages the system-wide default TxnExecutor
.
An object that represents the absence of a statically-bound current transaction.
Atomically executes atomic blocks using the default TxnExecutor
.
Atomically executes atomic blocks using the default TxnExecutor
. See
TxnExecutor.apply
.
Equivalent to Txn.retry
.
Equivalent to Txn.retryFor(timeout, unit)
.
This is the first half of the machinery for implementing orAtomic
.