storeAt
Atomically stores the new value into the element of this AtomicIntArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Samples
import kotlin.concurrent.atomics.*
fun main() {
//sampleStart
val a = AtomicIntArray(3)
a.storeAt(1, 7)
println(a.loadAt(1)) // 7
println(a.toString()) // [0, 7, 0]
//sampleEnd
}
Atomically stores the new value into the element of this AtomicIntArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically stores the new value into the element of this AtomicIntArray at the given index.
Has the same memory effects as java.util.concurrent.atomic.AtomicIntegerArray.set.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically stores the new value into the element of this AtomicIntArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically stores the new value into the element of this AtomicIntArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically stores the new value into the element of this AtomicIntArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.