winchester044
02/20/2019, 7:09 PMExecutorCoroutineDispatcherBase class:
override fun dispatch(context: CoroutineContext, block: Runnable) {
try {
executor.execute(timeSource.wrapTask(block))
} catch (e: RejectedExecutionException) {
timeSource.unTrackTask()
DefaultExecutor.enqueue(block)
}
}
Why is default executor chosen as a fallback option if the current executor dispatcher is shutdown? Also what will be Coroutine's context state in this case (as in the scope might still be valid but dispatcher is not active anymore)?