https://kotlinlang.org logo
#coroutines
Title
# coroutines
p

pardom

02/04/2019, 4:28 PM
Hey, all. 👋 Is there a platform agnostic
CoroutineDispatcher
(i.e. not
Dispatchers.Main
) that enforces a calling thread? I want to launch some tasks that return to the calling thread.
g

gildor

02/05/2019, 2:09 AM
Not yet. There are no threads on JS except main, so you just cannot use any other. Native threading and coroutines for native work in progress
p

pardom

02/05/2019, 7:07 PM
Actually, I think my problem would be obviated in JS since there aren’t any threads. The issue I’m having is that I want to post back to the original coroutine context from another context.
Perhaps this is something better accomplished with channels?
5 Views