load

expect fun load(): Boolean(source)

Atomically loads the value from this AtomicBoolean.

Since Kotlin

2.1

Samples

import kotlin.concurrent.atomics.*
import kotlin.concurrent.thread

fun main() { 
   //sampleStart 
   val a = AtomicBoolean(true)
println(a.load()) // true 
   //sampleEnd
}
actual fun load(): Boolean(source)

Atomically loads the value from this AtomicBoolean.

Since Kotlin

2.1
actual fun load(): Boolean(source)

Atomically loads the value from this AtomicBoolean.

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

Since Kotlin

2.1
actual fun load(): Boolean(source)

Atomically loads the value from this AtomicBoolean.

Since Kotlin

2.1
actual fun load(): Boolean(source)

Atomically loads the value from this AtomicBoolean.

Since Kotlin

2.1
actual fun load(): Boolean(source)

Atomically loads the value from this AtomicBoolean.

Since Kotlin

2.1