Skip to content

Commit a97d9db

Browse files
authored
Dispatchers.IO doc clarification (#3236)
Addresses #3234
1 parent 2c3435c commit a97d9db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ public actual object Dispatchers {
125125
*
126126
* This dispatcher and its views share threads with the [Default][Dispatchers.Default] dispatcher, so using
127127
* `withContext(Dispatchers.IO) { ... }` when already running on the [Default][Dispatchers.Default]
128-
* dispatcher does not lead to an actual switching to another thread — typically execution
129-
* continues in the same thread.
128+
* dispatcher typically does not lead to an actual switching to another thread. In such scenarios,
129+
* the underlying implementation attempts to keep the execution on the same thread on a best-effort basis.
130+
*
130131
* As a result of thread sharing, more than 64 (default parallelism) threads can be created (but not used)
131132
* during operations over IO dispatcher.
132133
*/

0 commit comments

Comments
 (0)