updateAndGet

inline fun <ERROR CLASS>.updateAndGet(function: (Long) -> Long): Long

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