Skip to content

Commit 52bead7

Browse files
zsmb13pablobaxter
authored andcommitted
Fix a broken sentence in CoroutineDispatcher.kt (Kotlin#3102)
1 parent 83056de commit 52bead7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kotlinx-coroutines-core/common/src/CoroutineDispatcher.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ public abstract class CoroutineDispatcher :
8888
* // At most 1 thread will be doing IO
8989
* private val fileWriterDispatcher = backgroundDispatcher.limitedParallelism(1)
9090
* ```
91-
* is 6. Yet at most 4 coroutines can be executed simultaneously as each view limits only its own parallelism.
91+
* Note how in this example the application has an executor with 4 threads, but the total sum of all limits
92+
* is 6. Still, at most 4 coroutines can be executed simultaneously as each view limits only its own parallelism.
9293
*
9394
* Note that this example was structured in such a way that it illustrates the parallelism guarantees.
9495
* In practice, it is usually better to use [Dispatchers.IO] or [Dispatchers.Default] instead of creating a

0 commit comments

Comments
 (0)