File tree 1 file changed +5
-1
lines changed
kotlinx-coroutines-core/jvm/src
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public actual object Dispatchers {
97
97
* The [CoroutineDispatcher] that is designed for offloading blocking IO tasks to a shared pool of threads.
98
98
*
99
99
* Additional threads in this pool are created and are shutdown on demand.
100
- * The number of threads used by this dispatcher is limited by the value of
100
+ * The number of threads used by tasks in this dispatcher is limited by the value of
101
101
* "`kotlinx.coroutines.io.parallelism`" ([IO_PARALLELISM_PROPERTY_NAME]) system property.
102
102
* It defaults to the limit of 64 threads or the number of cores (whichever is larger).
103
103
*
@@ -106,9 +106,13 @@ public actual object Dispatchers {
106
106
* If you need a higher number of parallel threads,
107
107
* you should use a custom dispatcher backed by your own thread pool.
108
108
*
109
+ * ### Implementation note
110
+ *
109
111
* This dispatcher shares threads with a [Default][Dispatchers.Default] dispatcher, so using
110
112
* `withContext(Dispatchers.IO) { ... }` does not lead to an actual switching to another thread —
111
113
* typically execution continues in the same thread.
114
+ * As a result of thread sharing, more than 64 (default parallelism) threads can be created (but not used)
115
+ * during operations over IO dispatcher.
112
116
*/
113
117
@JvmStatic
114
118
public val IO : CoroutineDispatcher = DefaultScheduler .IO
You can’t perform that action at this time.
0 commit comments