Skip to content

Commit 9d1146f

Browse files
wojtek-kalicinskiqwwdfsad
authored andcommitted
Clarify documentation around Dispatcher.IO parallelism
1 parent b6dd65c commit 9d1146f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ public actual object Dispatchers {
101101
* "`kotlinx.coroutines.io.parallelism`" ([IO_PARALLELISM_PROPERTY_NAME]) system property.
102102
* It defaults to the limit of 64 threads or the number of cores (whichever is larger).
103103
*
104+
* Moreover, the maximum configurable number of threads is capped by the
105+
* `kotlinx.coroutines.scheduler.max.pool.size` system property.
106+
* If you need a higher number of parallel threads,
107+
* you should use a custom dispatcher backed by your own thread pool.
108+
*
104109
* This dispatcher shares threads with a [Default][Dispatchers.Default] dispatcher, so using
105110
* `withContext(Dispatchers.IO) { ... }` does not lead to an actual switching to another thread —
106111
* typically execution continues in the same thread.

0 commit comments

Comments
 (0)