store

expect fun store(newValue: Int)(source)

Atomically stores the new value into this AtomicInt.

Since Kotlin

2.1

Samples

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

fun main() { 
   //sampleStart 
   val a = AtomicInt(7)
a.store(10)
println(a.load()) // 10 
   //sampleEnd
}
actual fun store(newValue: Int)(source)

Atomically stores the new value into this AtomicInt.

Since Kotlin

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

Atomically stores the new value into this AtomicInt.

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

Since Kotlin

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

Atomically stores the new value into this AtomicInt.

Since Kotlin

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

Atomically stores the new value into this AtomicInt.

Since Kotlin

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

Atomically stores the new value into this AtomicInt.

Since Kotlin

2.1