tseisel
01/27/2020, 3:07 PMDispatchers.Unconfined
? What kind of use-case does it solve ?Zach Klippenstein (he/him) [MOD]
01/27/2020, 6:01 PMoffer
returns. The Main.immediate
dispatcher on Android has similar behavior, which makes it easier to reason about changes to the UI.rocketraman
01/28/2020, 3:35 AMNested coroutines launched in this dispatcher form an event-loop to avoid stack overflows.As per the same docs, for the optimization of preventing initial dispatch, you don't need Unconfined... you can also do
launch
or async
and specify CoroutineStart.UNDISPATCHED
.