coroutines & JVM/JavaScript:
as far is I understood it, you'd start a coroutine in a JVM environment using runBlocking if you are not hooking into an event loop engine and use the IO or Default Dispatchers
how do coroutines integrate with the async infrastructure in JS?
✅ 1
s
Sam
07/07/2024, 11:52 AM
On JS, the default dispatcher is the same as the main dispatcher, and dispatches coroutines on the browser's main event loop.
b
Bernhard
07/07/2024, 11:53 AM
so just GlobalScope.launch the root of your application?