Update the value atomically by applying a computation to it.
Update the value atomically by applying a computation to it.
The computation returns a pair of values, of which the
AtomicRef
is updated to the first.
Uses compareAndSet
and will keep trying until it succeeds.
the second value of the computation
Update the value atomically by applying a function to it.
Update the value atomically by applying a function to it.
Uses compareAndSet
and will keep trying until it succeeds.
A subclass of java.util.concurrent.atomic.AtomicReference[A] that adds the ability to atomically modify its value relative to itself.