Thomas Skovsgaard
09/09/2020, 1:15 PMThere is no event loop. Use runBlocking { ... } to start one.
from the iOS part, I use kotlin 1.4, coroutines 1.3.9 and my iOS dispatcher is based on this https://github.com/JetBrains/kotlinconf-app/blob/33f2d4e65f470d1444c5d4b46249af8feb243d03/common/src/iosMain/kotlin/org/jetbrains/kotlinconf/DispatcherNative.kt
I have tried using native-mt with Dispatchers.Main but this gives me another error Fatal exception in coroutines machinery for CancellableContinuation
The Android part works as expected. I have searched and tried a lot of solutions, but can't seem to figure out what's going wrong, any guidance is much appreciated 🙂Ivann Ruiz
09/09/2020, 1:31 PM1.3.9-native-mt
insteadThomas Skovsgaard
09/09/2020, 1:53 PMFatal exception in coroutines machinery for CancellableContinuation
so unfortunately I'm still stuck, but thank you for the suggestion 👍Ivann Ruiz
09/09/2020, 2:43 PMkpgalligan
09/09/2020, 3:51 PMKweku
09/09/2020, 5:30 PMThomas Skovsgaard
09/09/2020, 5:42 PMdef coroutines_version = "1.3.9"
def ktor_version = "1.4.0"
def kodein_version = "7.1.0-master-88"
def serialization_version = "1.0.0-RC"
commonMain {
dependencies {
implementation(kotlin('stdlib-common'))
implementation "org.jetbrains.kotlinx:kotlinx-serialization-core:$serialization_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$serialization_version"
implementation "io.ktor:ktor-client-json:$ktor_version"
implementation "io.ktor:ktor-client-serialization:$ktor_version"
implementation "io.ktor:ktor-client-logging:$ktor_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.kodein.di:kodein-di:$kodein_version"
}
}
Ivann Ruiz
09/09/2020, 5:44 PM1.3.2-1.4.0-rc
kpgalligan
09/09/2020, 5:47 PMIvann Ruiz
09/09/2020, 5:56 PMVinod Rai
09/09/2020, 6:35 PMIvann Ruiz
09/09/2020, 6:40 PM1.4.0
to work for me, works like a charm after disabling Logging. Had it set up as LogLevel.All
Thomas Skovsgaard
09/09/2020, 7:40 PMkpgalligan
09/09/2020, 7:43 PMMgj
09/09/2020, 7:47 PMThomas Skovsgaard
09/09/2020, 7:48 PMYou don't need to implement anything with -native-mt version:
For main thread use Dispatchers.Main
For background thread use Dispatchers.Default
from
https://github.com/Kotlin/kotlinx.coroutines/issues/1889kpgalligan
09/10/2020, 1:11 AM