|
1 | 1 | # Change log for kotlinx.coroutines
|
2 | 2 |
|
| 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 | + |
3 | 39 | ## Version 0.14
|
4 | 40 |
|
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**. |
9 | 45 | * [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. |
13 | 49 | * `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. |
15 | 51 |
|
16 | 52 |
|
17 | 53 | ## Version 0.13
|
18 | 54 |
|
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. |
26 | 62 | * 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. |
32 | 68 | * 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. |
39 | 75 | * New documentation:
|
40 | 76 | * [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md)
|
41 | 77 | * [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. |
43 | 79 |
|
44 | 80 | ## Version 0.12
|
45 | 81 |
|
|
0 commit comments