Jelle Fresen [G]
08/07/2024, 12:23 PMtestDispatcher.scheduler.runCurrent()
, on which thread are the tasks run?Dmitry Khalanskiy [JB]
08/07/2024, 12:25 PMrunCurrent()
will itself run them.Jelle Fresen [G]
08/07/2024, 12:26 PMDmitry Khalanskiy [JB]
08/07/2024, 12:31 PMrunCurrent
executes the pending tasks for StandardTestDispatcher
inline, it doesn't ask any other thread to do it.Jelle Fresen [G]
08/07/2024, 12:32 PMDmitry Khalanskiy [JB]
08/07/2024, 12:33 PMrunCurrent
is not recommended: https://github.com/Kotlin/kotlinx.coroutines/issues/3919Dmitry Khalanskiy [JB]
08/07/2024, 12:34 PMrunCurrent
, runTest
will execute the pending tasks, so the main test thread runs them.