Skip to content

Commit 3327273

Browse files
authored
Update Dispatchers.Main documentation (#3450)
Fixes #3381
1 parent df9421a commit 3327273

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ public expect object Dispatchers {
2727
* Access to this property may throw an [IllegalStateException] if no main dispatchers are present in the classpath.
2828
*
2929
* Depending on platform and classpath, it can be mapped to different dispatchers:
30-
* - On JS and Native it is equivalent to the [Default] dispatcher.
3130
* - On JVM it is either the Android main thread dispatcher, JavaFx or Swing EDT dispatcher. It is chosen by the
3231
* [`ServiceLoader`](https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html).
32+
* - On JS it is equivalent to the [Default] dispatcher with [immediate][MainCoroutineDispatcher.immediate] support.
33+
* - On Native Darwin-based targets, it is a dispatcher backed by Darwin's main queue.
34+
* - On other Native targets, it is a single-threaded dispatcher backed by a standalone worker.
3335
*
3436
* In order to work with the `Main` dispatcher, the following artifact should be added to the project runtime dependencies:
3537
* - `kotlinx-coroutines-android` — for Android Main thread dispatcher
3638
* - `kotlinx-coroutines-javafx` — for JavaFx Application thread dispatcher
3739
* - `kotlinx-coroutines-swing` — for Swing EDT dispatcher
38-
*
39-
* Implementation note: [MainCoroutineDispatcher.immediate] is not supported on the Native and JS platforms.
4040
*/
4141
public val Main: MainCoroutineDispatcher
4242

0 commit comments

Comments
 (0)