@@ -39,10 +39,10 @@ public abstract class ExecutorCoroutineDispatcher: CoroutineDispatcher(), Closea
39
39
/* *
40
40
* Converts an instance of [ExecutorService] to an implementation of [ExecutorCoroutineDispatcher].
41
41
*
42
- * Note, that if the underlying executor uses limited queues and throws [RejectedExecutionException] on
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 [Dispatchers.IO], so that the affected coroutine can cleanup its
45
- * resources and promptly complete.
42
+ * Note, that if the underlying executor throws [RejectedExecutionException] on
43
+ * attempt to submit a continuation task (it typically happens on executor shutdown or when it uses limited queues),
44
+ * then the [Job] of the affected task is [cancelled][Job.cancel] and the task is submitted to the
45
+ * [Dispatchers.IO], so that the affected coroutine can cleanup its resources and promptly complete.
46
46
*/
47
47
@JvmName(" from" ) // this is for a nice Java API, see issue #255
48
48
public fun ExecutorService.asCoroutineDispatcher (): ExecutorCoroutineDispatcher =
@@ -51,10 +51,10 @@ public fun ExecutorService.asCoroutineDispatcher(): ExecutorCoroutineDispatcher
51
51
/* *
52
52
* Converts an instance of [Executor] to an implementation of [CoroutineDispatcher].
53
53
*
54
- * Note, that if the underlying executor uses limited queues and throws [RejectedExecutionException] on
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 [Dispatchers.IO], so that the affected coroutine can cleanup its
57
- * resources and promptly complete.
54
+ * Note, that if the underlying executor throws [RejectedExecutionException] on
55
+ * attempt to submit a continuation task (it typically happens on executor shutdown or when it uses limited queues),
56
+ * then the [Job] of the affected task is [cancelled][Job.cancel] and the task is submitted to the
57
+ * [Dispatchers.IO], so that the affected coroutine can cleanup its resources and promptly complete.
58
58
*/
59
59
@JvmName(" from" ) // this is for a nice Java API, see issue #255
60
60
public fun Executor.asCoroutineDispatcher (): CoroutineDispatcher =
0 commit comments