Skip to content

Commit f44737b

Browse files
committed
~ Rephrased docs a bit
1 parent a490165 commit f44737b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

kotlinx-coroutines-core/jvm/src/Executors.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public abstract class ExecutorCoroutineDispatcher: CoroutineDispatcher(), Closea
3939
/**
4040
* Converts an instance of [ExecutorService] to an implementation of [ExecutorCoroutineDispatcher].
4141
*
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.
4646
*/
4747
@JvmName("from") // this is for a nice Java API, see issue #255
4848
public fun ExecutorService.asCoroutineDispatcher(): ExecutorCoroutineDispatcher =
@@ -51,10 +51,10 @@ public fun ExecutorService.asCoroutineDispatcher(): ExecutorCoroutineDispatcher
5151
/**
5252
* Converts an instance of [Executor] to an implementation of [CoroutineDispatcher].
5353
*
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.
5858
*/
5959
@JvmName("from") // this is for a nice Java API, see issue #255
6060
public fun Executor.asCoroutineDispatcher(): CoroutineDispatcher =

0 commit comments

Comments
 (0)