Hey guys, kotlin co routine multiplatform mentione...
# multiplatform
c
Hey guys, kotlin co routine multiplatform mentioned that it is single thread (js style) on native platform. Is it exactly like JS with a delegation principal to a background thread? Or does everything solely run on the main thread ??? If so. Is there a way to "hook" it up to iOS dispatch system in order to have at least one more thread to be able to do computation in the background and updating progress on the main thread for example?
g
It's possible to run coroutines on another thread on iOS, but you cannot transfer data between threads, for moving work to another thread you have to use workers API for now
You also can check this discussion on coroutines issue tracker https://github.com/Kotlin/kotlinx.coroutines/issues/462
c
thank you guys. I’ll have a look at all your links
a
For multithreading in common source set you can also use https://github.com/badoo/Reaktive