Skip to content

Commit

Permalink
Fix a broken sentence in CoroutineDispatcher.kt (Kotlin#3102)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsmb13 committed Dec 20, 2021
1 parent f3db701 commit 10891bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kotlinx-coroutines-core/common/src/CoroutineDispatcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ public abstract class CoroutineDispatcher :
* // At most 1 thread will be doing IO
* private val fileWriterDispatcher = backgroundDispatcher.limitedParallelism(1)
* ```
* is 6. Yet at most 4 coroutines can be executed simultaneously as each view limits only its own parallelism.
* Note how in this example the application has an executor with 4 threads, but the total sum of all limits
* is 6. Still, at most 4 coroutines can be executed simultaneously as each view limits only its own parallelism.
*
* Note that this example was structured in such a way that it illustrates the parallelism guarantees.
* In practice, it is usually better to use [Dispatchers.IO] or [Dispatchers.Default] instead of creating a
Expand Down

0 comments on commit 10891bb

Please sign in to comment.