https://kotlinlang.org logo
Title
f

Frank Feng

11/05/2019, 9:22 AM
There is no event loop. Use runBlocking{...} to start one
I run the kotlin native lib on iOS, it throw this error.
v

Vsevolod Tolstopyatov [JB]

11/05/2019, 11:11 AM
Have you tried using
runBlocking
?
f

Frank Feng

11/05/2019, 11:59 AM
Yes,I tried. but it would block the thread.
l

louiscad

11/05/2019, 1:46 PM
@Frank Feng The solution in this comment should be what you're looking for: https://github.com/Kotlin/kotlinx.coroutines/issues/470#issuecomment-440080970
f

Frank Feng

11/05/2019, 2:02 PM
Thanks , it's really useful
v

Vsevolod Tolstopyatov [JB]

11/05/2019, 3:30 PM
Unfortunately, this is the limitation of current MPP model. We are actively working (branch
native-mt
) on the replacement