Skip to content

Commit 13bb6d4

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents 9ef4e0c + bfacb27 commit 13bb6d4

File tree

8 files changed

+40
-11
lines changed

8 files changed

+40
-11
lines changed

CHANGES.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Change log for kotlinx.coroutines
22

3+
## Version 0.20
4+
5+
* Migrated to Kotlin 1.2.0.
6+
* Channels:
7+
* Sequence-like `filter`, `map`, etc extensions on `ReceiveChannel` are introduced (see #88 by @fvasco and #69 by @konrad-kaminski).
8+
* Introduced `ReceiveChannel.cancel` method.
9+
* All operators on `ReceiveChannel` fully consume the original channel (`cancel` it when they are done) using a helper `consume` extension.
10+
* Deprecated `ActorJob` and `ProducerJob`; `actor` now returns `SendChannel` and `produce` returns `ReceiveChannel` (see #127).
11+
* `SendChannel.sendBlocking` extension method (see #157 by @@fvasco).
12+
* Parent-child relations between coroutines:
13+
* Introduced an optional `parent` job parameter for all coroutine builders so that code with an explict parent `Job` is more natural.
14+
* Added `parent` parameter to `CompletableDeferred` constructor.
15+
* Introduced `Job.children` property.
16+
* `Job.cancelChildren` is now an extension (member is deprecated and hidden).
17+
* `Job.joinChildren` extension is introduced.
18+
* Deprecated `Job.attachChild` as a error-prone API.
19+
* Fixed StackOverflow when waiting for a lot of completed children that did not remove their handlers from the parent.
20+
* Use `java.util.ServiceLoader` to find default instances of `CoroutineExceptionHandler`.
21+
* Android UI integration:
22+
* Use `Thread.getUncaughtExceptionPreHandler` to make sure that exceptions are logged before crash (see #148).
23+
* Introduce `UI.awaitFrame` for animation; added sample coroutine-based animation application for Android [here](ui/kotlinx-coroutines-android/animation-app).
24+
* Fixed `delay(Long.MAX_VALUE)` (see #161)
25+
* Added missing `DefaultDispatcher` on some reactive operators (see #174 by @fvasco)
26+
* Fixed `actor` and `produce` so that a cancellation of a Job cancels the underlying channel (closes and removes all the pending messages).
27+
* Fixed sporadic failure of `example-context-06` (see #160)
28+
* Fixed hang of `Job.start` on lazy coroutine with attached `invokeOnCompletion` handler.
29+
* A more gradual introduction to `runBlocking` and coroutines in the [guide](coroutines-guide.md) (see #166).
30+
331
## Version 0.19.3
432

533
* Fixed `send`/`openSubscription` race in `ArrayBroadcastChannel`.

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
44
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
5-
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=0.19.3) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/0.19.3)
5+
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.coroutines/images/download.svg?version=0.20) ](https://bintray.com/kotlin/kotlinx/kotlinx.coroutines/0.20)
66

77
Library support for Kotlin coroutines.
88
This is a companion version for Kotlin 1.2.0 release.
@@ -25,8 +25,9 @@ This is a companion version for Kotlin 1.2.0 release.
2525

2626
## Documentation
2727

28-
* [Introduction to Kotlin Coroutines](https://vimeo.com/222499934) video
29-
(Roman Elizarov at GeekOut 2017, [slides](https://www.slideshare.net/elizarov/introduction-to-kotlin-coroutines))
28+
* Presentations and videos:
29+
* [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))
30+
* [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))
3031
* Guides and manuals:
3132
* [Guide to kotlinx.coroutines by example](coroutines-guide.md) (**read it first**)
3233
* [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md)
@@ -51,7 +52,7 @@ Add dependencies (you can also add other modules that you need):
5152
<dependency>
5253
<groupId>org.jetbrains.kotlinx</groupId>
5354
<artifactId>kotlinx-coroutines-core</artifactId>
54-
<version>0.19.3</version>
55+
<version>0.20</version>
5556
</dependency>
5657
```
5758

@@ -68,7 +69,7 @@ And make sure that you use the latest Kotlin version:
6869
Add dependencies (you can also add other modules that you need):
6970

7071
```groovy
71-
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.19.3'
72+
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.20'
7273
```
7374

7475
And make sure that you use the latest Kotlin version:

coroutines-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ World!
178178
-->
179179

180180
The result is the same, but this code uses only non-blocking [delay].
181-
The the main thread, that invokes `runBlocking`, _blocks_ until the coroutine inside `runBlocking` is active.
181+
The the main thread, that invokes `runBlocking`, _blocks_ until the coroutine inside `runBlocking` completes.
182182

183183
This example can be also rewritten in a more idiomatic way, using `runBlocking` to wrap
184184
the execution of the main function:

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 0.19.3-SNAPSHOT
1+
version = 0.20-SNAPSHOT
22

33
kotlin_version = 1.2.0
44
junit_version = 4.12

ui/coroutines-guide-ui.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Add dependencies on `kotlinx-coroutines-android` module to the `dependencies { .
173173
`app/build.gradle` file:
174174

175175
```groovy
176-
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.19.3"
176+
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.20"
177177
```
178178

179179
Coroutines are experimental feature in Kotlin.

ui/kotlinx-coroutines-android/animation-app/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m
1919
kotlin.coroutines=enable
2020

2121
kotlin_version = 1.2.0
22-
coroutines_version = 0.19.3
22+
coroutines_version = 0.20
2323

ui/kotlinx-coroutines-android/example-app/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ dependencies {
3131
compile 'com.android.support:design:25.4.0'
3232
testCompile 'junit:junit:4.12'
3333
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
34-
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.19.3"
34+
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.20"
3535
}

ui/kotlinx-coroutines-android/example-app/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m
1919
kotlin.coroutines=enable
2020

2121
kotlin_version = 1.2.0
22-
coroutines_version = 0.19.3
22+
coroutines_version = 0.20
2323

0 commit comments

Comments
 (0)