jeff
07/27/2021, 3:02 PMkotlinx.coroutines.delay on Android uses Handler.postDelayed under the hood. That surprised me -- is it true? For Dispatcher.Main only, or all dispatchers?Zach Klippenstein (he/him) [MOD]
07/27/2021, 3:10 PMDispatchers.* 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.mateusz.kwiecinski
07/27/2021, 3:13 PMjeff
07/27/2021, 3:14 PMAdam Powell
07/27/2021, 3:17 PM