kotlinx.coroutines – Kotlin Programming Language (original) (raw)
kotlinx-coroutines-test/kotlinx.coroutines.test/TestDispatcher
TestDispatcher
abstract class TestDispatcher : CoroutineDispatcher, Delay, DelayWithTimeoutDiagnostics(source)
A test dispatcher that can interface with a TestCoroutineScheduler.
The available implementations are:
- StandardTestDispatcher is a dispatcher that places new tasks into a queue.
- UnconfinedTestDispatcher is a dispatcher that behaves like Dispatchers.Unconfined while allowing to control the virtual time.
Properties
Link copied to clipboard
abstract val scheduler: TestCoroutineScheduler
The scheduler that this dispatcher is linked to.