Skip to content

Commit d53db42

Browse files
committed
Update readme
1 parent 2717bd5 commit d53db42

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ GlobalScope.launch {
2020

2121
* [common](common/README.md) — common coroutines across all backends:
2222
* `launch` and `async` coroutine builders;
23-
* `Job` and `Deferred` light-weight future with cancellation support;
23+
* `Job` `Deferred` light-weight future with cancellation support;
24+
*` Dispatchers.Main` for UI dispatcher for Android, Swing and JavaFx;
2425
* `delay` and `yield` top-level suspending functions;
2526
* `Channel` and `Mutex` communication and synchronization primitives;
2627
* `produce` and `actor` coroutine builders;
28+
* `coroutineScope` and `supervisorScope` scope builders;
29+
* `SupervisorJob` for supervision of coroutines hierarchies;
2730
* `select` expression support and more.
2831
* [core](core/README.md) — Kotlin/JVM implementation of common coroutines with additional features:
2932
* `Dispatchers.IO` dispatcher for blocking coroutines.
@@ -39,8 +42,8 @@ GlobalScope.launch {
3942
## Documentation
4043

4144
* Presentations and videos:
42-
* [Introduction to Coroutines](https://www.youtube.com/watch?v=_hfBv0a09Jc) (Roman Elizarov at KotlinConf 2017, [slides](https://www.slideshare.net/elizarov/introduction-to-coroutines-kotlinconf-2017))
43-
* [Deep dive into Coroutines](https://www.youtube.com/watch?v=YrrUCSi72E8) (Roman Elizarov at KotlinConf 2017, [slides](https://www.slideshare.net/elizarov/deep-dive-into-coroutines-on-jvm-kotlinconf-2017))
45+
* [Introduction to Coroutines](https://www.youtube.com/watch?v=_hfBv0a09Jc) (Roman Elizarov at KotlinConf 2017, [slides](https://www.slideshare.net/elizarov/introduction-to-coroutines-kotlinconf-2017))
46+
* [Deep dive into Coroutines](https://www.youtube.com/watch?v=YrrUCSi72E8) (Roman Elizarov at KotlinConf 2017, [slides](https://www.slideshare.net/elizarov/deep-dive-into-coroutines-on-jvm-kotlinconf-2017))
4447
* Guides and manuals:
4548
* [Guide to kotlinx.coroutines by example](docs/coroutines-guide.md) (**read it first**)
4649
* [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md)

ui/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Coroutines for UI
22

33
This directory contains modules for coroutine programming with various single-threaded UI libraries.
4+
After adding dependency to the UI library, corresponding UI dispatcher will be available via `Dispatchers.Main`.
45
Module name below corresponds to the artifact name in Maven/Gradle.
56

67
## Modules

ui/coroutines-guide-ui.md

+4
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ different UI application libraries:
7171
* [kotlinx-coroutines-javafx](kotlinx-coroutines-javafx) -- `Dispatchers.JavaFx` context for JavaFX UI applications.
7272
* [kotlinx-coroutines-swing](kotlinx-coroutines-swing) -- `Dispatchers.Swing` context for Swing UI applications.
7373

74+
Also, UI dispatcher is available via `Dispatchers.Main` from `kotlinx-coroutines-core` and corresponding
75+
implementation (Android, JavaFx or Swing) is discovered by [`ServiceLoader`](https://docs.oracle.com/javase/8/docs/api/java/util/ServiceLoader.html) API.
76+
For example, if you are writing JavaFx application, you can use either `Dispatchers.Main` or `Dispachers.JavaFx` extension, it will be the same object.
77+
7478
This guide covers all UI libraries simultaneously, because each of these modules consists of just one
7579
object definition that is a couple of pages long. You can use any of them as an example to write the corresponding
7680
context object for your favourite UI library, even if it is not included out of the box here.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Module kotlinx-coroutines-javafx
22

3-
Provides `Dispatchers.JavaFx` context for JavaFX UI applications.
3+
Provides `Dispatchers.JavaFx` context and `Dispatchers.Main` implementation for JavaFX UI applications.
44

55
Read [Guide to UI programming with coroutines](https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/coroutines-guide-ui.md)
66
for tutorial on this module.
77

88
# Package kotlinx.coroutines.experimental.javafx
99

10-
Provides `Dispatchers.JavaFx` context for JavaFX UI applications.
10+
Provides `Dispatchers.JavaFx` context and `Dispatchers.Main` implementation for JavaFX UI applications.

ui/kotlinx-coroutines-swing/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Module kotlinx-coroutines-swing
22

3-
Provides `Dispatchers.Swing` context for Swing UI applications.
3+
Provides `Dispatchers.Swing` context and `Dispatchers.Main` implementation for Swing UI applications.
44

55
Read [Guide to UI programming with coroutines](https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/coroutines-guide-ui.md)
66
for tutorial on this module.
77

88
# Package kotlinx.coroutines.experimental.swing
99

10-
Provides `Dispatchers.Swing` context for Swing UI applications.
10+
Provides `Dispatchers.Swing` context and `Dispatchers.Main` implementation for Swing UI applications.

0 commit comments

Comments
 (0)