Skip to content

Commit a1ff3bd

Browse files
committed
Version 0.17
1 parent 256812a commit a1ff3bd

File tree

20 files changed

+58
-24
lines changed

20 files changed

+58
-24
lines changed

CHANGES.md

+38-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# Change log for kotlinx.coroutines
22

3+
## Version 0.17
4+
5+
* `CompletableDeferred` is introduced as a set-once event-like communication primitive (see #70).
6+
* [Coroutines guide](coroutines-guide.md) uses it in a section on actors.
7+
* `CompletableDeferred` is an interface with private impl (courtesy of @fvasco, see #86).
8+
* It extends `Deferred` interface with `complete` and `completeExceptionally` functions.
9+
* `Job.join` and `Job.await` wait until a cancelled coroutine stops execution (see #64).
10+
* `Job` and `Deferred` have a new _cancelling_ state which they enter on invocation of `cancel`.
11+
* `Job.invokeOnCompletion` has an additional overload with `onCancelling: Boolean` parameter to
12+
install handlers that are fired as soon as coroutine enters _cancelling_ state as opposed
13+
to waiting until it _completes_.
14+
* Internal `select` implementation is refactored to decouple it from `JobSupport` internal class
15+
and to optimize its state-machine.
16+
* Internal `AbstractCoroutine` class is refactored so that it is extended only by true coroutines,
17+
all of which support the new _cancelling_ state.
18+
* `CoroutineScope.context` is renamed to `coroutineContext` to avoid conflicts with other usages of `context`
19+
in applications (like Android context, see #75).
20+
* `BroadcastChannel.open` is renamed to `openSubscription` (see #54).
21+
* Fixed `StackOverflowError` in a convoy of `Mutex.unlock` invokers with `Unconfined` dispatcher (see #80).
22+
* Fixed `SecurityException` when trying to use coroutines library with installed `SecurityManager`.
23+
* Fixed a bug in `withTimeoutOrNull` in case with nested timeouts when coroutine was cancelled before it was
24+
ever suspended.
25+
* Fixed a minor problem with `awaitFirst` on reactive streams that would have resulted in spurious stack-traces printed
26+
on the console when used with publishers/observables that continue to invoke `onNext` despite being cancelled/disposed
27+
(which they are technically allowed to do by specification).
28+
* All factory functions for various interfaces are implemented as top-level functions
29+
(affects `Job`, `Channel`, `BroadcastChannel`, `Mutex`, `EventLoop`, and `CoroutineExceptionHandler`).
30+
Previous approach of using `operator invoke` on their companion objects is deprecated.
31+
* Nicer-to-use debug `toString` implementations for coroutine dispatcher tasks and continuations.
32+
* A default dispatcher for `delay` is rewritten and now shares code with `EventLoopImpl` that is used by
33+
`runBlocking`. It internally supports non-default `TimeSource` so that delay-using tests can be written
34+
with "virtual time" by replacing their time source for the duration of tests (this feature is not available
35+
outside of the library).
36+
337
## Version 0.16
438

539
* Coroutines that are scheduled for execution are cancellable by default now
@@ -13,15 +47,15 @@
1347
* `run` function is also cancellable in the same way and accepts an optional
1448
`CoroutineStart` parameter to change this default.
1549
* `BroadcastChannel` factory function is introduced
16-
* `CorouiteExceptionHandler` factory function is introduced by @konrad-kaminski
50+
* `CoroutineExceptionHandler` factory function is introduced by @konrad-kaminski
1751
* [`integration`](integration) directory is introduced for all 3rd party integration projects
1852
* It has [contribution guidelines](integration/README.md#contributing) and contributions from community are welcome
1953
* Support for Guava `ListenableFuture` in the new [`kotlinx-coroutines-guava`](integration/kotlinx-coroutines-guava) module
2054
* Rx1 Scheduler support by @konrad-kaminski
21-
* #66 Fixed a number of `Channel` and `BroadcastChannel` implementation bugs related to concurrent
22-
send/close/close of channels that lead to hanging send, offer or close operations.
55+
* Fixed a number of `Channel` and `BroadcastChannel` implementation bugs related to concurrent
56+
send/close/close of channels that lead to hanging send, offer or close operations (see #66).
2357
Thanks to @chrisly42 and @cy6erGn0m for finding them.
24-
* #67 Fixed `withTimeoutOrNull` which was returning `null` on timeout of inner or outer `withTimeout` blocks.
58+
* Fixed `withTimeoutOrNull` which was returning `null` on timeout of inner or outer `withTimeout` blocks (see #67).
2559
Thanks to @gregschlom for finding the problem.
2660
* Fixed a bug where `Job` fails to dispose a handler when it is the only handler by @uchuhimo
2761

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Add dependencies (you can also add other modules that you need):
5454
<dependency>
5555
<groupId>org.jetbrains.kotlinx</groupId>
5656
<artifactId>kotlinx-coroutines-core</artifactId>
57-
<version>0.16</version>
57+
<version>0.17</version>
5858
</dependency>
5959
```
6060

@@ -79,7 +79,7 @@ repositories {
7979
Add dependencies (you can also add other modules that you need):
8080

8181
```groovy
82-
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.16'
82+
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.17'
8383
```
8484

8585
And make sure that you use the right Kotlin version:

benchmarks/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.jetbrains.kotlinx</groupId>
2626
<artifactId>kotlinx-coroutines</artifactId>
27-
<version>0.16-SNAPSHOT</version>
27+
<version>0.17-SNAPSHOT</version>
2828
</parent>
2929

3030
<artifactId>benchmarks</artifactId>

integration/kotlinx-coroutines-guava/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.jetbrains.kotlinx</groupId>
2323
<artifactId>kotlinx-coroutines</artifactId>
24-
<version>0.16-SNAPSHOT</version>
24+
<version>0.17-SNAPSHOT</version>
2525
<relativePath>../../pom.xml</relativePath>
2626
</parent>
2727

integration/kotlinx-coroutines-jdk8/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.jetbrains.kotlinx</groupId>
2323
<artifactId>kotlinx-coroutines</artifactId>
24-
<version>0.16-SNAPSHOT</version>
24+
<version>0.17-SNAPSHOT</version>
2525
<relativePath>../../pom.xml</relativePath>
2626
</parent>
2727

integration/kotlinx-coroutines-nio/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

knit/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>org.jetbrains.kotlinx</groupId>
2323
<artifactId>kotlinx-coroutines</artifactId>
24-
<version>0.16-SNAPSHOT</version>
24+
<version>0.17-SNAPSHOT</version>
2525
</parent>
2626

2727
<artifactId>knit</artifactId>

kotlinx-coroutines-core/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>kotlinx-coroutines-core</artifactId>

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<groupId>org.jetbrains.kotlinx</groupId>
2525
<artifactId>kotlinx-coroutines</artifactId>
26-
<version>0.16-SNAPSHOT</version>
26+
<version>0.17-SNAPSHOT</version>
2727
<packaging>pom</packaging>
2828

2929
<description>Coroutines support libraries for Kotlin 1.1</description>

reactive/kotlinx-coroutines-reactive/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

reactive/kotlinx-coroutines-reactor/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>org.jetbrains.kotlinx</groupId>
2525
<artifactId>kotlinx-coroutines</artifactId>
26-
<version>0.16-SNAPSHOT</version>
26+
<version>0.17-SNAPSHOT</version>
2727
<relativePath>../../pom.xml</relativePath>
2828
</parent>
2929

reactive/kotlinx-coroutines-rx-example/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

reactive/kotlinx-coroutines-rx1/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

reactive/kotlinx-coroutines-rx2/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

site/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
</parent>
2727

2828
<artifactId>kotlinx-coroutines-site</artifactId>

ui/coroutines-guide-ui.md

+1-1
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.16"
176+
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.17"
177177
```
178178

179179
Coroutines are experimental feature in Kotlin.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies {
3636
compile 'com.android.support:design:25.2.0'
3737
testCompile 'junit:junit:4.12'
3838
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
39-
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.16"
39+
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.17"
4040
}
4141

4242
kotlin {

ui/kotlinx-coroutines-android/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

ui/kotlinx-coroutines-javafx/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

ui/kotlinx-coroutines-swing/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.jetbrains.kotlinx</groupId>
2424
<artifactId>kotlinx-coroutines</artifactId>
25-
<version>0.16-SNAPSHOT</version>
25+
<version>0.17-SNAPSHOT</version>
2626
<relativePath>../../pom.xml</relativePath>
2727
</parent>
2828

0 commit comments

Comments
 (0)