under the hood. That surprised me -- is it true? For Dispatcher.Main only, or all dispatchers?
z
Zach Klippenstein (he/him) [MOD]
07/27/2021, 3:10 PM
Of the official
Dispatchers.*
dispatchers, it’s only for
Dispatchers.Main
, and only on Android. It’s also for any custom dispatchers derived from `Handler`s (thanks @Adam Powell for the correction). On jvm, delay uses the AWT/Swing event loop. The whole point of
Dispatchers.Main
is that it delegates to the current platform’s main thread event loop.