storeAt

expect fun storeAt(index: Int, newValue: Long)(source)

Atomically stores the new value into the element of this AtomicLongArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

Samples

import kotlin.concurrent.atomics.*

fun main() { 
   //sampleStart 
   val a = AtomicLongArray(3)
a.storeAt(1, 7)
println(a.loadAt(1)) // 7
println(a.toString()) // [0, 7, 0] 
   //sampleEnd
}
actual fun storeAt(index: Int, newValue: Long)(source)

Atomically stores the new value into the element of this AtomicLongArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun storeAt(index: Int, newValue: Long)(source)

Atomically stores the new value into the element of this AtomicLongArray at the given index.

Has the same memory effects as java.util.concurrent.atomic.AtomicLongArray.set.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun storeAt(index: Int, newValue: Long)(source)

Atomically stores the new value into the element of this AtomicLongArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun storeAt(index: Int, newValue: Long)(source)

Atomically stores the new value into the element of this AtomicLongArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun storeAt(index: Int, newValue: Long)(source)

Atomically stores the new value into the element of this AtomicLongArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.