store

expect fun store(newValue: T)(source)

Atomically stores the new value into this AtomicReference.

Since Kotlin

2.1

Samples

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

fun main() { 
   //sampleStart 
   val a = AtomicReference("aaa")
a.store("bbb")
println(a.load()) // bbb 
   //sampleEnd
}
actual fun store(newValue: T)(source)

Atomically stores the new value into this AtomicReference.

Since Kotlin

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

Atomically stores the new value into this AtomicReference.

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

Since Kotlin

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

Atomically stores the new value into this AtomicReference.

Since Kotlin

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

Atomically stores the new value into this AtomicReference.

Since Kotlin

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

Atomically stores the new value into this AtomicReference.

Since Kotlin

2.1