From fc6e31e206d3a024189b701903736429423fc767 Mon Sep 17 00:00:00 2001 From: Roman Elizarov Date: Mon, 4 Dec 2017 14:41:51 +0300 Subject: [PATCH] Version 0.20 --- CHANGES.md | 28 +++++++++++++++++++ README.md | 6 ++-- gradle.properties | 2 +- ui/coroutines-guide-ui.md | 2 +- .../animation-app/gradle.properties | 2 +- .../example-app/app/build.gradle | 2 +- .../example-app/gradle.properties | 2 +- 7 files changed, 36 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a59aab76b0..48a0f665a8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,33 @@ # Change log for kotlinx.coroutines +## Version 0.20 + +* Migrated to Kotlin 1.2.0. +* Channels: + * Sequence-like `filter`, `map`, etc extensions on `ReceiveChannel` are introduced (see #88 by @fvasco and #69 by @konrad-kaminski). + * Introduced `ReceiveChannel.cancel` method. + * All operators on `ReceiveChannel` fully consume the original channel (`cancel` it when they are done) using a helper `consume` extension. + * Deprecated `ActorJob` and `ProducerJob`; `actor` now returns `SendChannel` and `produce` returns `ReceiveChannel` (see #127). + * `SendChannel.sendBlocking` extension method (see #157 by @@fvasco). +* Parent-child relations between coroutines: + * Introduced an optional `parent` job parameter for all coroutine builders so that code with an explict parent `Job` is more natural. + * Added `parent` parameter to `CompletableDeferred` constructor. + * Introduced `Job.children` property. + * `Job.cancelChildren` is now an extension (member is deprecated and hidden). + * `Job.joinChildren` extension is introduced. + * Deprecated `Job.attachChild` as a error-prone API. + * Fixed StackOverflow when waiting for a lot of completed children that did not remove their handlers from the parent. +* Use `java.util.ServiceLoader` to find default instances of `CoroutineExceptionHandler`. +* Android UI integration: + * Use `Thread.getUncaughtExceptionPreHandler` to make sure that exceptions are logged before crash (see #148). + * Introduce `UI.awaitFrame` for animation; added sample coroutine-based animation application for Android [here](ui/kotlinx-coroutines-android/animation-app). + * Fixed `delay(Long.MAX_VALUE)` (see #161) +* Added missing `DefaultDispatcher` on some reactive operators (see #174 by @fvasco) +* Fixed `actor` and `produce` so that a cancellation of a Job cancels the underlying channel (closes and removes all the pending messages). +* Fixed sporadic failure of `example-context-06` (see #160) +* Fixed hang of `Job.start` on lazy coroutine with attached `invokeOnCompletion` handler. +* A more gradual introduction to `runBlocking` and coroutines in the [guide](coroutines-guide.md) (see #166). + ## Version 0.19.3 * Fixed `send`/`openSubscription` race in `ArrayBroadcastChannel`. diff --git a/README.md b/README.md index 8405081009..64a901aadc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) -[![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) +[![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) Library support for Kotlin coroutines. This is a companion version for Kotlin 1.2.0 release. @@ -52,7 +52,7 @@ Add dependencies (you can also add other modules that you need): org.jetbrains.kotlinx kotlinx-coroutines-core - 0.19.3 + 0.20 ``` @@ -69,7 +69,7 @@ And make sure that you use the latest Kotlin version: Add dependencies (you can also add other modules that you need): ```groovy -compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.19.3' +compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.20' ``` And make sure that you use the latest Kotlin version: diff --git a/gradle.properties b/gradle.properties index 91d14220cd..f745340298 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version = 0.19.3-SNAPSHOT +version = 0.20-SNAPSHOT kotlin_version = 1.2.0 junit_version = 4.12 diff --git a/ui/coroutines-guide-ui.md b/ui/coroutines-guide-ui.md index 7b2319a0ca..f0093c2330 100644 --- a/ui/coroutines-guide-ui.md +++ b/ui/coroutines-guide-ui.md @@ -173,7 +173,7 @@ Add dependencies on `kotlinx-coroutines-android` module to the `dependencies { . `app/build.gradle` file: ```groovy -compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.19.3" +compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.20" ``` Coroutines are experimental feature in Kotlin. diff --git a/ui/kotlinx-coroutines-android/animation-app/gradle.properties b/ui/kotlinx-coroutines-android/animation-app/gradle.properties index fbbf243429..b6a285733c 100644 --- a/ui/kotlinx-coroutines-android/animation-app/gradle.properties +++ b/ui/kotlinx-coroutines-android/animation-app/gradle.properties @@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m kotlin.coroutines=enable kotlin_version = 1.2.0 -coroutines_version = 0.19.3 +coroutines_version = 0.20 diff --git a/ui/kotlinx-coroutines-android/example-app/app/build.gradle b/ui/kotlinx-coroutines-android/example-app/app/build.gradle index 7210c28eca..f277824ea6 100644 --- a/ui/kotlinx-coroutines-android/example-app/app/build.gradle +++ b/ui/kotlinx-coroutines-android/example-app/app/build.gradle @@ -31,5 +31,5 @@ dependencies { compile 'com.android.support:design:25.4.0' testCompile 'junit:junit:4.12' compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" - compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.19.3" + compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.20" } diff --git a/ui/kotlinx-coroutines-android/example-app/gradle.properties b/ui/kotlinx-coroutines-android/example-app/gradle.properties index fbbf243429..b6a285733c 100644 --- a/ui/kotlinx-coroutines-android/example-app/gradle.properties +++ b/ui/kotlinx-coroutines-android/example-app/gradle.properties @@ -19,5 +19,5 @@ org.gradle.jvmargs=-Xmx1536m kotlin.coroutines=enable kotlin_version = 1.2.0 -coroutines_version = 0.19.3 +coroutines_version = 0.20