How come `Main.immediate` isn't the default dispat...
# coroutines
r
How come
Main.immediate
isn't the default dispatcher of
MainScope()
? Is there any disadvantage in using
immediate
?
g
Yes, behavior of non-immediate dispatcher is more predictable, it always goes through dispatching, so you don't have small behavior changes when start a coroutine from main thread, which cause immediate execution, it may even cause block thread if you do it in a cycle, so you have to call yeild() to force dispatching. Nothing wrong with immediate, but default dispatcher just has less gotchas
❤️ 1