|
1 | 1 | # Change log for kotlinx.coroutines
|
2 | 2 |
|
| 3 | +## Version 0.19 |
| 4 | + |
| 5 | +* This release is published to Maven Central. |
| 6 | +* `DefaultDispatcher` is introduced (see #136): |
| 7 | + * `launch`, `async`, `produce`, `actor` and other integration-specific coroutine builders now use |
| 8 | + `DefaultDispatcher` as the default value for their `context` parameter. |
| 9 | + * When a context is explicitly specified, `newCoroutineContext` function checks if there is any |
| 10 | + interceptor/dispatcher defined in the context and uses `DefaultDispatcher` if there is none. |
| 11 | + * `DefaultDispatcher` is currently defined to be equal to `CommonPool`. |
| 12 | + * Examples in the [guide](coroutines-guide.md) now start with `launch { ... }` code and explanation on the nature |
| 13 | + and the need for coroutine context starts in "Coroutine context and dispatchers" section. |
| 14 | +* Parent coroutines now wait for their children (see #125): |
| 15 | + * Job _completing_ state is introduced in documentation as a state in which parent coroutine waits for its children. |
| 16 | + * `Job.attachChild` and `Job.cancelChildren` are introduced. |
| 17 | + * `Job.join` now always checks cancellation status of invoker coroutine for predictable behavior when joining |
| 18 | + failed child coroutine. |
| 19 | + * `Job.cancelAndJoin` extension is introduced. |
| 20 | + * `CoroutineContext.cancel` and `CoroutineContext.cancelChildren` extensions are introduced for convenience. |
| 21 | + * `withTimeout`/`withTimeoutOrNull` blocks become proper coroutines that have `CoroutineScope` and wait for children, too. |
| 22 | + * Diagnostics in cancellation and unexpected exception messages are improved, |
| 23 | + coroutine name is included in debug mode. |
| 24 | + * Fixed cancellable suspending functions to throw `CancellationException` (as was documented before) even when |
| 25 | + the coroutine is cancelled with another application-specific exception. |
| 26 | + * `JobCancellationException` is introduced as a specific subclass of `CancellationException` which is |
| 27 | + used for coroutines that are cancelled without cause and to wrap application-specific exceptions. |
| 28 | + * `Job.getCompletionException` is renamed to `Job.getCancellationException` and return a wrapper exception if needed. |
| 29 | + * Introduced `Deferred.getCompletionExceptionOrNull` to get not-wrapped exception result of `async` task. |
| 30 | + * Updated docs for `Job` & `Deferred` to explain parent/child relations. |
| 31 | +* `select` expression is modularized: |
| 32 | + * `SelectClause(0,1,2)` interfaces are introduced, so that synchronization |
| 33 | + constructs can define their select clauses without having to modify |
| 34 | + the source of the `SelectBuilder` in `kotlinx-corounes-core` module. |
| 35 | + * `Job.onJoin`, `Deferred.onAwait`, `Mutex.onLock`, `SendChannel.onSend`, `ReceiveChannel.onReceive`, etc |
| 36 | + that were functions before are now properties returning the corresponding select clauses. Old functions |
| 37 | + are left in bytecode for backwards compatibility on use-site, but any outside code that was implementing those |
| 38 | + interfaces by itself must be updated. |
| 39 | + * This opens road to moving channels into a separate module in future updates. |
| 40 | +* Renamed `TimeoutException` to `TimeoutCancellationException` (old name is deprecated). |
| 41 | +* Fixed various minor problems: |
| 42 | + * JavaFx toolkit is now initialized by `JavaFx` context (see #108). |
| 43 | + * Fixed lost ACC_STATIC on <clinit> methods (see #116). |
| 44 | + * Fixed link to source code from documentation (see #129). |
| 45 | + * Fixed `delay` in arbitrary contexts (see #133). |
| 46 | +* `kotlinx-coroutines-io` module is introduced. It is a work-in-progress on `ByteReadChannel` and `ByteWriteChannel` |
| 47 | + interfaces, their implementations, and related classes to enable convenient coroutine integration with various |
| 48 | + asynchronous I/O libraries and sockets. It is currently _unstable_ and **will change** in the next release. |
| 49 | + |
3 | 50 | ## Version 0.18
|
4 | 51 |
|
5 | 52 | * Kotlin 1.1.4 is required to use this version, which enables:
|
|
0 commit comments