@@ -41,7 +41,7 @@ public abstract class ExecutorCoroutineDispatcher: CoroutineDispatcher(), Closea
41
41
*
42
42
* Note, that if the underlying executor uses limited queues and throws [RejectedExecutionException] on
43
43
* attempt to submit a task, then the [Job] of the affected task is [cancelled][Job.cancel] and the
44
- * task is submitted to the default single-threaded executor , so that the affected coroutine can cleanup its
44
+ * task is submitted to the [Dispatchers.IO] , so that the affected coroutine can cleanup its
45
45
* resources and promptly complete.
46
46
*/
47
47
@JvmName(" from" ) // this is for a nice Java API, see issue #255
@@ -53,7 +53,7 @@ public fun ExecutorService.asCoroutineDispatcher(): ExecutorCoroutineDispatcher
53
53
*
54
54
* Note, that if the underlying executor uses limited queues and throws [RejectedExecutionException] on
55
55
* attempt to submit a task, then the [Job] of the affected task is [cancelled][Job.cancel] and the
56
- * task is submitted to the default single-threaded executor , so that the affected coroutine can cleanup its
56
+ * task is submitted to the [Dispatchers.IO] , so that the affected coroutine can cleanup its
57
57
* resources and promptly complete.
58
58
*/
59
59
@JvmName(" from" ) // this is for a nice Java API, see issue #255
@@ -93,7 +93,7 @@ internal abstract class ExecutorCoroutineDispatcherBase : ExecutorCoroutineDispa
93
93
} catch (e: RejectedExecutionException ) {
94
94
unTrackTask()
95
95
cancelJobOnRejection(context, e)
96
- DefaultExecutor .enqueue( block)
96
+ Dispatchers . IO .dispatch(context, block)
97
97
}
98
98
}
99
99
0 commit comments