In this FeedStore class I want to launch a new cor...
# coroutines
s
In this FeedStore class I want to launch a new coroutine on Dispatchers.IO, but it's not available. Why? I want to load data not on the UI thread... https://github.com/Kotlin/kmm-production-sample/blob/master/shared/src/commonMain/kotlin/com/github/jetbrains/rssreader/app/FeedStore.kt
1
b
IO Dispatcher is not in common coroutines core since js doesn't support it. If you don't use js target you can bring io dispatcher to common code via expect/actual
🙏 1
r
Imho IO dispatcher is only on Android/JVM. I use
Dispatchers.Default
to offload work from UI thread in common code and it works on Android + iOS.
🙏 1