jsMain.runners.DefaultWorkRunners.kt Maven / Gradle / Ivy
package kt.mobius.runners
import kt.mobius.functions.Producer
import kotlin.browser.window
actual class DefaultWorkRunners {
actual fun eventWorkRunnerProducer() = Producer {
object : WorkRunner {
override fun post(runnable: Runnable) {
window.setTimeout(runnable::run, 0)
}
override fun dispose() {
}
}
}
actual fun effectWorkRunnerProducer() = Producer {
object : WorkRunner {
override fun post(runnable: Runnable) {
window.setTimeout(runnable::run, 0)
}
override fun dispose() {
}
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy