Skip to content

Commit

Permalink
Version 0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
elizarov committed May 4, 2017
1 parent e3aa8ff commit 8a07e5a
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 56 deletions.
90 changes: 63 additions & 27 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,81 @@
# Change log for kotlinx.coroutines

## Version 0.15

* Switched to Kotlin version 1.1.2 (can still be used with 1.1.0).
* `CoroutineStart` enum is introduced for `launch`/`async`/`actor` builders:
* The usage of `luanch(context, start = false)` is deprecated and is replaced with
`launch(context, CoroutineStart.LAZY)`
* `CoroutineStart.UNDISPATCHED` is introduced to start coroutine execution immediately in the invoker thread,
so that `async(context, CoroutineStart.UNDISPATCHED)` is similar to the behavior of C# `async`.
* [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md) mentions the use of it to optimize
the start of coroutines from UI threads.
* Introduced `BroadcastChannel` interface in `kotlinx-coroutines-core` module:
* It extends `SendChannel` interface and provides `open` function to create subscriptions.
* Subscriptions are represented with `SubscriptionReceiveChannel` interface.
* The corresponding `SubscriptionReceiveChannel` interfaces are removed from [reactive](reactive) implementation
modules. They use an interface defined in `kotlinx-coroutines-core` module.
* `ConflatedBroadcastChannel` implementation is provided for state-observation-like use-cases, where a coroutine or a
regular code (in UI, for example) updates the state that subscriber coroutines shall react to.
* `ArrayBroadcastChannel` implementation is provided for event-bus-like use-cases, where a sequence of events shall
be received by multiple subscribers without any omissions.
* [Guide to reactive streams with coroutines](reactive/coroutines-guide-reactive.md) includes
"Rx Subject vs BroadcastChannel" section.
* Pull requests from Konrad Kamiński are merged into reactive stream implementations:
* Support for Project Reactor `Mono` and `Flux`.
See [`kotlinx-coroutines-reactor`](reactive/kotlinx-coroutines-reactor) module.
* Implemented Rx1 `Completable.awaitCompleted`.
* Added support for Rx2 `Maybe`.
* Better timeout support:
* Introduced `withTimeoutOrNull` function.
* Implemented `onTimeout` clause for `select` expressions.
* Fixed spurious concurrency inside `withTimeout` blocks on their cancellation.
* Changed the behavior of `withTimeout` when `CancellationException` is suppressed inside the block. The
invocation of `withTimeout` now always returns the result of the execution of its inner block.
* The `channel` property in `ActorScope` is promoted to a wider `Channel` type, so that an actor
can have an easy access to its own inbox send channel.
* Renamed `Mutex.withMutex` to `Mutex.withLock`, old name is deprecated.

## Version 0.14

* Switched to Kotlin version 1.1.1 (can still be used with 1.1.0)
* Introduced `consumeEach` helper function for channels and reactive streams, Rx 1.x, and Rx 2.x
* It ensures that streams are unsubscribed from on any exception
* Iteration with `for` loop on reactive streams is **deprecated**
* Switched to Kotlin version 1.1.1 (can still be used with 1.1.0).
* Introduced `consumeEach` helper function for channels and reactive streams, Rx 1.x, and Rx 2.x.
* It ensures that streams are unsubscribed from on any exception.
* Iteration with `for` loop on reactive streams is **deprecated**.
* [Guide to reactive streams with coroutines](reactive/coroutines-guide-reactive.md) is updated virtually
all over the place to reflect these important changes
* Implemented `awaitFirstOrDefault` extension for reactive streams, Rx 1.x, and Rx 2.x
* Added `Mutex.withMutex` helper function
all over the place to reflect these important changes.
* Implemented `awaitFirstOrDefault` extension for reactive streams, Rx 1.x, and Rx 2.x.
* Added `Mutex.withMutex` helper function.
* `kotlinx-coroutines-android` module has `provided` dependency on of Android APIs to
eliminate warnings when using it in android project
eliminate warnings when using it in android project.


## Version 0.13

* New `kotlinx-coroutinex-android` module with Android `UI` context implementation
* Introduced `whileSelect` convenience function
* Implemented `ConflatedChannel`
* Renamed various `toXXX` conversion functions to `asXXX` (old names are deprecated)
* `run` is optimized with fast-path case and no longer has `CoroutineScope` in its block
* Fixed dispatching logic of `withTimeout` (removed extra dispatch)
* `EventLoop` that is used by `runBlocking` now implements Delay, giving more predictable test behavior
* New `kotlinx-coroutinex-android` module with Android `UI` context implementation.
* Introduced `whileSelect` convenience function.
* Implemented `ConflatedChannel`.
* Renamed various `toXXX` conversion functions to `asXXX` (old names are deprecated).
* `run` is optimized with fast-path case and no longer has `CoroutineScope` in its block.
* Fixed dispatching logic of `withTimeout` (removed extra dispatch).
* `EventLoop` that is used by `runBlocking` now implements Delay, giving more predictable test behavior.
* Various refactorings related to resource management and timeouts:
* `Job.Registration` is renamed to `DisposableHandle`
* `EmptyRegistration` is renamed to `NonDisposableHandle`
* `Job.unregisterOnCompletion` is renamed to `Job.disposeOnCompletion`
* `Delay.invokeOnTimeout` is introduced
* `withTimeout` now uses `Delay.invokeOnTimeout` when available
* `Job.Registration` is renamed to `DisposableHandle`.
* `EmptyRegistration` is renamed to `NonDisposableHandle`.
* `Job.unregisterOnCompletion` is renamed to `Job.disposeOnCompletion`.
* `Delay.invokeOnTimeout` is introduced.
* `withTimeout` now uses `Delay.invokeOnTimeout` when available.
* A number of improvement for reactive streams and Rx:
* Introduced `rxFlowable` builder for Rx 2.x
* `Scheduler.asCoroutineDispatcher` extension for Rx 2.x
* Fixed bug with sometimes missing `onComplete` in `publish`, `rxObservable`, and `rxFlowable` builders
* Channels that are open for reactive streams are now `Closeable`
* Fixed `CompletableSource.await` and added test for it
* Removed `rx.Completable.await` due to name conflict
* Introduced `rxFlowable` builder for Rx 2.x.
* `Scheduler.asCoroutineDispatcher` extension for Rx 2.x.
* Fixed bug with sometimes missing `onComplete` in `publish`, `rxObservable`, and `rxFlowable` builders.
* Channels that are open for reactive streams are now `Closeable`.
* Fixed `CompletableSource.await` and added test for it.
* Removed `rx.Completable.await` due to name conflict.
* New documentation:
* [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md)
* [Guide to reactive streams with coroutines](reactive/coroutines-guide-reactive.md)
* Code is published to JCenter repository
* Code is published to JCenter repository.

## Version 0.12

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

And make sure that you use the right Kotlin version:

```xml
<properties>
<kotlin.version>1.1.1</kotlin.version>
<kotlin.version>1.1.2</kotlin.version>
</properties>
```

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

```groovy
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.15-SNAPSHOT'
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.15'
```

And make sure that you use the right Kotlin version:

```groovy
buildscript {
ext.kotlin_version = '1.1.1'
ext.kotlin_version = '1.1.2'
}
```
44 changes: 22 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,28 @@
</license>
</licenses>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.1.2</kotlin.version>
<dokka.version>0.9.14</dokka.version>
<junit.version>4.12</junit.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>

<prerequisites>
<maven>3.0.2</maven>
</prerequisites>

<developers>
<developer>
<id>JetBrains</id>
<name>JetBrains Team</name>
<organization>JetBrains</organization>
<organizationUrl>http://www.jetbrains.com</organizationUrl>
</developer>
</developers>

<scm>
<url>https://github.com/Kotlin/kotlinx.coroutines</url>
<connection>scm:git:https://github.com/Kotlin/kotlinx.coroutines.git</connection>
Expand Down Expand Up @@ -66,28 +88,6 @@
</pluginRepository>
</pluginRepositories>

<developers>
<developer>
<id>JetBrains</id>
<name>JetBrains Team</name>
<organization>JetBrains</organization>
<organizationUrl>http://www.jetbrains.com</organizationUrl>
</developer>
</developers>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.1.1</kotlin.version>
<dokka.version>0.9.14</dokka.version>
<junit.version>4.12</junit.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>

<prerequisites>
<maven>3.0.2</maven>
</prerequisites>

<distributionManagement>
<repository>
<id>bintray</id>
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.15-SNAPSHOT"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.15"
```

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.15-SNAPSHOT"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.15"
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion ui/kotlinx-coroutines-android/example-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.1'
ext.kotlin_version = '1.1.2'
repositories {
jcenter()
}
Expand Down

0 comments on commit 8a07e5a

Please sign in to comment.