Skip to content

Commit 8a07e5a

Browse files
committed
Version 0.15
1 parent e3aa8ff commit 8a07e5a

File tree

6 files changed

+92
-56
lines changed

6 files changed

+92
-56
lines changed

CHANGES.md

+63-27
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,81 @@
11
# Change log for kotlinx.coroutines
22

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

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

1652

1753
## Version 0.13
1854

19-
* New `kotlinx-coroutinex-android` module with Android `UI` context implementation
20-
* Introduced `whileSelect` convenience function
21-
* Implemented `ConflatedChannel`
22-
* Renamed various `toXXX` conversion functions to `asXXX` (old names are deprecated)
23-
* `run` is optimized with fast-path case and no longer has `CoroutineScope` in its block
24-
* Fixed dispatching logic of `withTimeout` (removed extra dispatch)
25-
* `EventLoop` that is used by `runBlocking` now implements Delay, giving more predictable test behavior
55+
* New `kotlinx-coroutinex-android` module with Android `UI` context implementation.
56+
* Introduced `whileSelect` convenience function.
57+
* Implemented `ConflatedChannel`.
58+
* Renamed various `toXXX` conversion functions to `asXXX` (old names are deprecated).
59+
* `run` is optimized with fast-path case and no longer has `CoroutineScope` in its block.
60+
* Fixed dispatching logic of `withTimeout` (removed extra dispatch).
61+
* `EventLoop` that is used by `runBlocking` now implements Delay, giving more predictable test behavior.
2662
* Various refactorings related to resource management and timeouts:
27-
* `Job.Registration` is renamed to `DisposableHandle`
28-
* `EmptyRegistration` is renamed to `NonDisposableHandle`
29-
* `Job.unregisterOnCompletion` is renamed to `Job.disposeOnCompletion`
30-
* `Delay.invokeOnTimeout` is introduced
31-
* `withTimeout` now uses `Delay.invokeOnTimeout` when available
63+
* `Job.Registration` is renamed to `DisposableHandle`.
64+
* `EmptyRegistration` is renamed to `NonDisposableHandle`.
65+
* `Job.unregisterOnCompletion` is renamed to `Job.disposeOnCompletion`.
66+
* `Delay.invokeOnTimeout` is introduced.
67+
* `withTimeout` now uses `Delay.invokeOnTimeout` when available.
3268
* A number of improvement for reactive streams and Rx:
33-
* Introduced `rxFlowable` builder for Rx 2.x
34-
* `Scheduler.asCoroutineDispatcher` extension for Rx 2.x
35-
* Fixed bug with sometimes missing `onComplete` in `publish`, `rxObservable`, and `rxFlowable` builders
36-
* Channels that are open for reactive streams are now `Closeable`
37-
* Fixed `CompletableSource.await` and added test for it
38-
* Removed `rx.Completable.await` due to name conflict
69+
* Introduced `rxFlowable` builder for Rx 2.x.
70+
* `Scheduler.asCoroutineDispatcher` extension for Rx 2.x.
71+
* Fixed bug with sometimes missing `onComplete` in `publish`, `rxObservable`, and `rxFlowable` builders.
72+
* Channels that are open for reactive streams are now `Closeable`.
73+
* Fixed `CompletableSource.await` and added test for it.
74+
* Removed `rx.Completable.await` due to name conflict.
3975
* New documentation:
4076
* [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md)
4177
* [Guide to reactive streams with coroutines](reactive/coroutines-guide-reactive.md)
42-
* Code is published to JCenter repository
78+
* Code is published to JCenter repository.
4379

4480
## Version 0.12
4581

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ Add dependencies (you can also add other modules that you need):
5959
<dependency>
6060
<groupId>org.jetbrains.kotlinx</groupId>
6161
<artifactId>kotlinx-coroutines-core</artifactId>
62-
<version>0.15-SNAPSHOT</version>
62+
<version>0.15</version>
6363
</dependency>
6464
```
6565

6666
And make sure that you use the right Kotlin version:
6767

6868
```xml
6969
<properties>
70-
<kotlin.version>1.1.1</kotlin.version>
70+
<kotlin.version>1.1.2</kotlin.version>
7171
</properties>
7272
```
7373

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

8686
```groovy
87-
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.15-SNAPSHOT'
87+
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.15'
8888
```
8989

9090
And make sure that you use the right Kotlin version:
9191

9292
```groovy
9393
buildscript {
94-
ext.kotlin_version = '1.1.1'
94+
ext.kotlin_version = '1.1.2'
9595
}
9696
```

pom.xml

+22-22
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,28 @@
3939
</license>
4040
</licenses>
4141

42+
<properties>
43+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44+
<kotlin.version>1.1.2</kotlin.version>
45+
<dokka.version>0.9.14</dokka.version>
46+
<junit.version>4.12</junit.version>
47+
<maven.compiler.source>1.6</maven.compiler.source>
48+
<maven.compiler.target>1.6</maven.compiler.target>
49+
</properties>
50+
51+
<prerequisites>
52+
<maven>3.0.2</maven>
53+
</prerequisites>
54+
55+
<developers>
56+
<developer>
57+
<id>JetBrains</id>
58+
<name>JetBrains Team</name>
59+
<organization>JetBrains</organization>
60+
<organizationUrl>http://www.jetbrains.com</organizationUrl>
61+
</developer>
62+
</developers>
63+
4264
<scm>
4365
<url>https://github.com/Kotlin/kotlinx.coroutines</url>
4466
<connection>scm:git:https://github.com/Kotlin/kotlinx.coroutines.git</connection>
@@ -66,28 +88,6 @@
6688
</pluginRepository>
6789
</pluginRepositories>
6890

69-
<developers>
70-
<developer>
71-
<id>JetBrains</id>
72-
<name>JetBrains Team</name>
73-
<organization>JetBrains</organization>
74-
<organizationUrl>http://www.jetbrains.com</organizationUrl>
75-
</developer>
76-
</developers>
77-
78-
<properties>
79-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
80-
<kotlin.version>1.1.1</kotlin.version>
81-
<dokka.version>0.9.14</dokka.version>
82-
<junit.version>4.12</junit.version>
83-
<maven.compiler.source>1.6</maven.compiler.source>
84-
<maven.compiler.target>1.6</maven.compiler.target>
85-
</properties>
86-
87-
<prerequisites>
88-
<maven>3.0.2</maven>
89-
</prerequisites>
90-
9191
<distributionManagement>
9292
<repository>
9393
<id>bintray</id>

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

4242
kotlin {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.1.1'
4+
ext.kotlin_version = '1.1.2'
55
repositories {
66
jcenter()
77
}

0 commit comments

Comments
 (0)