loadAt
Atomically loads the value from the element of this AtomicArray 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 = AtomicArray(arrayOf("aaa", "bbb", "ccc"))
println(a.loadAt(1)) // bbb
println(a.toString()) // [aaa, bbb, ccc]
//sampleEnd
}
Atomically loads the value from the element of this AtomicArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically loads the value from the element of this AtomicArray at the given index.
Has the same memory effects as java.util.concurrent.atomic.AtomicReferenceArray.get.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically loads the value from the element of this AtomicArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically loads the value from the element of this AtomicArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.
Atomically loads the value from the element of this AtomicArray at the given index.
Since Kotlin
2.1Throws
if the index is out of bounds of this array.