@@ -39,8 +39,9 @@ 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 throws [RejectedExecutionException] on
43
- * attempt to submit a continuation task (it typically happens on executor shutdown or when it uses limited queues),
42
+ * If the underlying executor throws [RejectedExecutionException] on
43
+ * attempt to submit a continuation task (it happens when [closing][ExecutorCoroutineDispatcher.close] the
44
+ * resulting dispatcher, on underlying executor [shutdown][ExecutorService.shutdown], or when it uses limited queues),
44
45
* then the [Job] of the affected task is [cancelled][Job.cancel] and the task is submitted to the
45
46
* [Dispatchers.IO], so that the affected coroutine can cleanup its resources and promptly complete.
46
47
*/
@@ -51,8 +52,9 @@ public fun ExecutorService.asCoroutineDispatcher(): ExecutorCoroutineDispatcher
51
52
/* *
52
53
* Converts an instance of [Executor] to an implementation of [CoroutineDispatcher].
53
54
*
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),
55
+ * If the underlying executor throws [RejectedExecutionException] on
56
+ * attempt to submit a continuation task (it happens when [closing][ExecutorCoroutineDispatcher.close] the
57
+ * resulting dispatcher, on underlying executor [shutdown][ExecutorService.shutdown], or when it uses limited queues),
56
58
* then the [Job] of the affected task is [cancelled][Job.cancel] and the task is submitted to the
57
59
* [Dispatchers.IO], so that the affected coroutine can cleanup its resources and promptly complete.
58
60
*/
0 commit comments