does it guaranteed I'll get the same thread always?
(Its for testing purposes, where I want to replace Main dispatcher with something single threaded)
g
gildor
12/07/2021, 3:44 AM
No, it doesn’t guaranteed
But why do you want to have the same thread even for testing purpose?
Also there is StandardTestDispatcher for test purposes, which will be linked to TestCoroutineScheduler (so you can pause/advance it)
u
ursus
12/07/2021, 5:38 PM
By default I dont want to move time, som I'd like to create a separate single thread which mimics ui thread in tests; different from test thread
g
gildor
12/08/2021, 2:29 AM
Evne if you don’t want to move it, I think test scheduler is fine, or after all, you can just create a single threaded executor
gildor
12/08/2021, 2:30 AM
though, I still don’t see why you need particular thread