1
1
# kotlinx.coroutines
2
2
3
- Library support for Kotlin coroutines. This is a companion version for Kotlin 1.1.0-beta-18 release.
3
+ Library support for Kotlin coroutines. This is a companion version for Kotlin 1.1.0-beta-22 release.
4
4
5
5
## Modules and features
6
6
7
7
* ` kotlinx-coroutines-core ` module with core primitives to work with coroutines. It is designed to work on any JDK6+ and Android
8
8
and contains the following main pieces:
9
- * ` launch(context) { ... } ` to start a coroutine in the given context and get reference to its ` Job ` .
10
- * ` run(context) { ... } ` to switch to a different context inside a coroutine.
11
- * ` runBlocking { ... } ` to use asynchronous Kotlin APIs from a thread-blocking code.
12
- * ` defer(context) { ... } ` to get a deferred result of coroutine execution in a non-blocking way
13
- via a light-weight future interface called ` Deferred ` .
14
- * ` delay(...) ` for a non-blocking sleep in coroutines.
15
- * ` CommonPool ` and ` Here ` contexts, ` context ` or a parent coroutine.
9
+ * ` launch(context) {...} ` to start a coroutine in the given context and get reference to its ` Job ` .
10
+ * ` run(context) {...} ` to switch to a different context inside a coroutine.
11
+ * ` runBlocking {...} ` to use asynchronous Kotlin APIs from a thread-blocking code.
12
+ * ` defer(context) {...} ` and ` lazyDefer(context) {...} ` to get a deferred result of coroutine execution in a
13
+ non-blocking way via a light-weight future interface called ` Deferred ` .
14
+ * ` delay(...) ` for a non-blocking sleep in coroutines and ` yield ` to release a thread in single-threaded dispatchers.
15
+ * ` withTimeout(timeout) {...} ` scope function to easily set coroutine time-limit (deadline),
16
+ and ` NonCancellable ` context to avoid it when needed.
17
+ * ` CommonPool ` and ` Here ` contexts, access to ` context ` of a parent coroutine in its ` CoroutineScope ` .
16
18
* ` newSingleThreadContext(...) ` and ` newFixedThreadPoolContext(...) ` functions,
17
19
` Executor.toCoroutineDispatcher() ` extension.
18
20
* Cancellation support with ` Job ` interface and ` suspendCancellableCoroutine ` helper function.
@@ -36,9 +38,9 @@ from inside coroutines. It is in very basic form now (example-only, not even clo
36
38
37
39
## References and documentation
38
40
39
- * [ Coroutines guide ] ( coroutines-guide.md )
40
- * [ Change log] ( CHANGES.md )
41
- * [ Coroutines design document] ( https://github.com/Kotlin/kotlin-coroutines/blob/master/kotlin-coroutines-informal.md )
41
+ * [ Guide to kotlinx.coroutines by example ] ( coroutines-guide.md )
42
+ * [ Change log for kotlinx.coroutines ] ( CHANGES.md )
43
+ * [ Coroutines design document (KEEP) ] ( https://github.com/Kotlin/kotlin-coroutines/blob/master/kotlin-coroutines-informal.md )
42
44
43
45
## Using in your projects
44
46
@@ -79,7 +81,7 @@ And make sure that you use the right Kotlin version:
79
81
80
82
``` xml
81
83
<properties >
82
- <kotlin .version>1.1.0-beta-18 </kotlin .version>
84
+ <kotlin .version>1.1.0-beta-22 </kotlin .version>
83
85
</properties >
84
86
```
85
87
@@ -105,6 +107,6 @@ And make sure that you use the right Kotlin version:
105
107
106
108
``` groovy
107
109
buildscript {
108
- ext.kotlin_version = '1.1.0-beta-18 '
110
+ ext.kotlin_version = '1.1.0-beta-22 '
109
111
}
110
112
```
0 commit comments