There are `newSingleThreadContext` and `newFixedTh...
# coroutines
s
There are
newSingleThreadContext
and
newFixedThreadPoolContext
provided by coroutines library out of box, and you can construct your own
CoroutineContext
based on any
ExecutorService
like this:
Copy code
open class BaseCoroutineDispatcher(private val executor: ExecutorService) : CoroutineDispatcher() {
    override fun dispatch(context: CoroutineContext, block: Runnable) {
        executor.execute(block)
    }
}