With the new dispatcher slicing `<http://Dispatche...
# coroutines
u
With the new dispatcher slicing
<http://Dispatchers.IO|Dispatchers.IO>.limitedParallelism(1)
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
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
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
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
though, I still don’t see why you need particular thread