updateAndGet

inline fun <V> AtomicRef<V>.updateAndGet(function: (V) -> V): V(source)

Updates variable atomically using the specified function of its value and returns its new value.