loadAt

expect fun loadAt(index: Int): Int(source)

Atomically loads the value from the element of this AtomicIntArray 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 = AtomicIntArray(intArrayOf(0, 10, 20))
println(a.loadAt(1)) // 10 
   //sampleEnd
}
actual fun loadAt(index: Int): Int(source)

Atomically loads the value from the element of this AtomicIntArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun loadAt(index: Int): Int(source)

Atomically loads the value from the element of this AtomicIntArray at the given index.

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

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun loadAt(index: Int): Int(source)

Atomically loads the value from the element of this AtomicIntArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun loadAt(index: Int): Int(source)

Atomically loads the value from the element of this AtomicIntArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.

actual fun loadAt(index: Int): Int(source)

Atomically loads the value from the element of this AtomicIntArray at the given index.

Since Kotlin

2.1

Throws

if the index is out of bounds of this array.