store

expect fun store(newValue: Boolean)(source)

Atomically stores the new value into this AtomicBoolean.

Since Kotlin

2.1

Samples

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

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

Atomically stores the new value into this AtomicBoolean.

Since Kotlin

2.1
actual fun store(newValue: Boolean)(source)

Atomically stores the new value into this AtomicBoolean.

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

Since Kotlin

2.1
actual fun store(newValue: Boolean)(source)

Atomically stores the new value into this AtomicBoolean.

Since Kotlin

2.1
actual fun store(newValue: Boolean)(source)

Atomically stores the new value into this AtomicBoolean.

Since Kotlin

2.1
actual fun store(newValue: Boolean)(source)

Atomically stores the new value into this AtomicBoolean.

Since Kotlin

2.1