Skip to content

Commit

Permalink
Version 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
elizarov committed Jul 24, 2017
1 parent 256812a commit a1ff3bd
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 24 deletions.
42 changes: 38 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Change log for kotlinx.coroutines

## Version 0.17

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

## Version 0.16

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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Add dependencies (you can also add other modules that you need):
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
<version>0.16</version>
<version>0.17</version>
</dependency>
```

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

```groovy
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.16'
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.17'
```

And make sure that you use the right Kotlin version:
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
</parent>

<artifactId>benchmarks</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/kotlinx-coroutines-guava/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion integration/kotlinx-coroutines-jdk8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion integration/kotlinx-coroutines-nio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion knit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
</parent>

<artifactId>knit</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion kotlinx-coroutines-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
</parent>

<artifactId>kotlinx-coroutines-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<packaging>pom</packaging>

<description>Coroutines support libraries for Kotlin 1.1</description>
Expand Down
2 changes: 1 addition & 1 deletion reactive/kotlinx-coroutines-reactive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion reactive/kotlinx-coroutines-reactor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion reactive/kotlinx-coroutines-rx-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion reactive/kotlinx-coroutines-rx1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion reactive/kotlinx-coroutines-rx2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
</parent>

<artifactId>kotlinx-coroutines-site</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ui/coroutines-guide-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.16"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.17"
```

Coroutines are experimental feature in Kotlin.
Expand Down
2 changes: 1 addition & 1 deletion ui/kotlinx-coroutines-android/example-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
compile 'com.android.support:design:25.2.0'
testCompile 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.16"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.17"
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion ui/kotlinx-coroutines-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion ui/kotlinx-coroutines-javafx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion ui/kotlinx-coroutines-swing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines</artifactId>
<version>0.16-SNAPSHOT</version>
<version>0.17-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down

0 comments on commit a1ff3bd

Please sign in to comment.