public long getAndUpdate(LongUnaryOperator updateFunction) {
        long prev, next;
        do {
            prev = lvVal();
            next = updateFunction.applyAsLong(prev);
        } while (!casVal(prev, next));
        return prev;
    }
Atomically updates the current value with the results of
applying the given function, returning the previous value. The
function should be side-effect-free, since it may be re-applied
when attempted updates fail due to contention among threads.

@param updateFunction a side-effect-free function
@return the previous value
@see java.util.concurrent.atomic.AtomicLong#getAndUpdate(LongUnaryOperator)
jctools-core/src/main/java/org/jctools/util/PaddedAtomicLong.java