Manages which backing thread the coroutine will use for its execution, removing the responsibility of when and where to use a new thread from the developer. The thread is chosen behind the scenes.
Dispatcher
s are one of the ways coroutines can be so performant. The Dispatcher
avoids the performance cost of initializing new threads.
By default, Kotlin coroutines provides three Dispatchers: