The reference STM implementation for scala.concurrent.stm.
The reference STM implementation for scala.concurrent.stm. CCSTM is a
library-only STM based on the SwissTM algorithm, extended to reduce the
overhead of non-transactional accesses, allow partial rollback, and include
modular blocking and composition operators retry and orAtomic.
During construction the system property "ccstm.stats" is checked. If it is
"true" or "1" (actually if it starts with any of the characters 't', 'T',
'y', 'Y', or '1') then statistics are recorded while the program runs and
printed to Console during JVM shutdown.
Statistics are tracked separately for top-level transactions and true
nested transactions. Many nested atomic blocks can be merged into the
top-level transaction by CCSTM for efficiency; these are not reported as
Reported statistics are either counts or exponential histograms. For
histograms sum is the sum of the samples, count is the number of
transactions for which the statistic was non-zero, avg is sum/count
and the histogram reports in brackets the number of samples that had a
value of 1, 2..3, 4..7, 8..15, and so on.
Read and write set counts for a nested transaction are merged into its
parent if it commits, they are not counted separately during the nested