All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.arkivanov.mvikotlin.utils.internal.Atomic.kt Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
@file:JvmName("AtomicJvm")

package com.arkivanov.mvikotlin.utils.internal

import kotlin.jvm.JvmName

interface AtomicRef {

    var value: T

    fun compareAndSet(expected: T, new: T): Boolean
}

interface AtomicBoolean {

    var value: Boolean
}

interface AtomicInt {

    var value: Int
}

expect fun  atomic(value: T): AtomicRef

expect fun atomic(value: Boolean): AtomicBoolean

expect fun atomic(value: Int): AtomicInt

fun  atomic(): AtomicRef = atomic(null)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy