commonMain.com.arkivanov.mvikotlin.rx.internal.DisposableBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rx-internal Show documentation
Show all versions of rx-internal Show documentation
Kotlin Multiplatform MVI framework
The newest version!
package com.arkivanov.mvikotlin.rx.internal
import com.arkivanov.mvikotlin.rx.Disposable
import kotlin.concurrent.Volatile
fun Disposable(onDispose: Disposable.() -> Unit = {}): Disposable =
object : Disposable {
@Volatile
override var isDisposed: Boolean = false
override fun dispose() {
isDisposed = true
onDispose()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy