getAndAdd

fun getAndAdd(delta: Int): Int(source)

Atomically adds the given value to the current value and returns the old value.

Since Kotlin

1.9