@@ -4,18 +4,21 @@ Library support for Kotlin coroutines. This is a companion version for Kotlin 1.
44It contains worked-out implementation of coroutine builders, suspending functions, and contexts that are
55used as examples in
66[ Kotlin coroutines design document] ( https://github.com/Kotlin/kotlin-coroutines/blob/master/kotlin-coroutines-informal.md )
7+
8+ See [ change log] ( CHANGES.md ) for a summary of changes between releases.
79
810It consists of the following modules:
911
1012* ` kotlinx-coroutines-core ` module with core primitives to work with coroutines. It is designed to work on any JDK6+ and Android
1113and contains the following main pieces:
1214 * ` launch(context) { ... } ` to start a coroutine in the given context.
1315 * ` run(context) { ... } ` to switch to a different context inside a coroutine.
14- * ` runBlocking(context) { ... } ` to use asynchronous Kotlin APIs from a thread-blocking code.
16+ * ` runBlocking { ... } ` to use asynchronous Kotlin APIs from a thread-blocking code.
1517 * ` defer(context) { ... } ` to get a deferred result of coroutine execution in a non-blocking way.
1618 * ` delay(...) ` for a non-blocking sleep in coroutines.
17- * ` Here ` and ` CommonPool ` contexts.
18- * ` newSingleThreadContext(...) ` and ` newFixedThreadPoolContext(...) ` functions.
19+ * ` Here ` and ` CommonPool ` contexts, ` context ` or a parent coroutine.
20+ * ` newSingleThreadContext(...) ` and ` newFixedThreadPoolContext(...) ` functions,
21+ ` Executor.toCoroutineDispatcher() ` extension.
1922 * Cancellation support with ` Job ` interface and ` suspendCancellableCoroutine ` helper function.
2023 * Debugging facilities for coroutines (run JVM with ` -ea ` or ` -Dkotlinx.coroutines.debug ` options) and
2124 ` newCoroutineContext(context) ` function to write user-defined coroutine builders that work with these
@@ -25,7 +28,7 @@ and contains the following main pieces:
2528 * ` future { ... } ` coroutine builder that returns ` CompletableFuture ` and works in ` CommonPool ` context by default.
2629 * ` .await() ` suspending function for ` CompletableFuture ` .
2730
28- * ` kotlinx-coroutines-nio ` module with extensions for asynchronous IO on JDK7+ (does not support cancellation yet) .
31+ * ` kotlinx-coroutines-nio ` module with extensions for asynchronous IO on JDK7+.
2932
3033* ` kotlinx-coroutines-swing ` module with ` Swing ` context for Swing UI applications.
3134
@@ -66,7 +69,7 @@ Add dependencies (you can also add other modules that you need):
6669<dependency >
6770 <groupId >org.jetbrains.kotlinx</groupId >
6871 <artifactId >kotlinx-coroutines-core</artifactId >
69- <version >0.3 -beta</version >
72+ <version >0.4 -beta</version >
7073</dependency >
7174```
7275
@@ -93,7 +96,7 @@ repositories {
9396Add dependencies (you can also add other modules that you need):
9497
9598``` groovy
96- compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.3 -beta'
99+ compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.4 -beta'
97100```
98101
99102And make sure that you use the right Kotlin version:
0 commit comments