Kcas_data.AccumulatorScalable accumulator.
A scalable accumulator can be used to scalably accumulate an integer value in parallel as long as the accumulated value is read infrequently.
val make : int -> tmake n returns a new accumulator whose initial value is n.
module Xt : sig ... endExplicit transaction log passing on accumulators.
val add : t -> int -> unitadd a n increments the value of the accumulator a by n. add operations can be performed scalably in parallel.
val incr : t -> unitincr a is equivalent to add a 1.
val decr : t -> unitdecr a is equivalent to add a (-1).
val get : t -> intget a returns the current value of the accumulator.
CAUTION: Performing a get is expensive and can limit scalability.
val set : t -> int -> unitset a n sets the current value of the accumulator a to n.