load
Atomically loads the value from this AtomicBoolean.
Since Kotlin
2.1Samples
import kotlin.concurrent.atomics.*
import kotlin.concurrent.thread
fun main() {
//sampleStart
val a = AtomicBoolean(true)
println(a.load()) // true
//sampleEnd
}
Atomically loads the value from this AtomicBoolean.
Since Kotlin
2.1Atomically loads the value from this AtomicBoolean.
Has the same memory effects as java.util.concurrent.atomic.AtomicBoolean.get.
Since Kotlin
2.1Atomically loads the value from this AtomicBoolean.
Since Kotlin
2.1Atomically loads the value from this AtomicBoolean.
Since Kotlin
2.1Atomically loads the value from this AtomicBoolean.