nativeMain.app.cash.sqldelight.internal.Atomics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime Show documentation
Show all versions of runtime Show documentation
Multiplatform runtime library to support generated code
The newest version!
package app.cash.sqldelight.internal
import kotlin.native.concurrent.AtomicReference
import kotlin.native.concurrent.freeze
actual class Atomic actual constructor(value: V) {
private val atomicRef = AtomicReference(value)
actual fun get() = atomicRef.value
actual fun set(value: V) {
atomicRef.value = value.freeze()
}
}
actual class AtomicBoolean actual constructor(value: Boolean) {
private val atomicBoolean = co.touchlab.stately.concurrency.AtomicBoolean(value)
actual fun get() = atomicBoolean.value
actual fun set(value: Boolean) {
atomicBoolean.value = value
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy