fetchAndAddAt

expect fun fetchAndAddAt(index: Int, delta: Int): Int(source)

Atomically adds the given delta to the element of this AtomicIntArray at the given index and returns the old value of the element.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

Samples

actual fun fetchAndAddAt(index: Int, delta: Int): Int(source)

Atomically adds the given delta to the element of this AtomicIntArray at the given index and returns the old value of the element.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun fetchAndAddAt(index: Int, delta: Int): Int(source)

Atomically adds the given delta the element of this AtomicIntArray at the given index by and returns the old value of the element.

Has the same memory effects as java.util.concurrent.atomic.AtomicIntegerArray.getAndAdd.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun fetchAndAddAt(index: Int, delta: Int): Int(source)

Atomically adds the given delta to the element of this AtomicIntArray at the given index and returns the old value of the element.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun fetchAndAddAt(index: Int, delta: Int): Int(source)

Atomically adds the given delta the element of this AtomicIntArray at the given index by and returns the old value of the element.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun fetchAndAddAt(index: Int, delta: Int): Int(source)

Atomically adds the given delta the element of this AtomicIntArray at the given index by and returns the old value of the element.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.