diff options
Diffstat (limited to 'CHANGES.md')
-rw-r--r-- | CHANGES.md | 74 |
1 files changed, 18 insertions, 56 deletions
@@ -1,43 +1,5 @@ # Change log for kotlinx.coroutines -## Version 1.4.3 - -### General changes - -* Thread context is properly preserved and restored for coroutines without `ThreadContextElement` (#985) -* `ThreadContextElement`s are now restored in the opposite order from update (#2195) -* Improved performance of combine with 4 parameters, thanks to @alexvanyo (#2419) -* Debug agent sanitizer leaves at least one frame with source location (#1437) -* Update Reactor version in `kotlinx-coroutines-reactor` to `3.4.1`, thanks to @sokomishalov (#2432) -* `callInPlace` contract added to `ReceiveChannel.consume` (#941) -* `CoroutineStart.UNDISPATCHED` promoted to stable API (#1393) -* Kotlin updated to 1.4.30 -* `kotlinx.coroutines` are now released directly to MavenCentral -* Reduced the size of `DispatchedCoroutine` by a field -* Internal class `TimeSource` renamed to `SchedulerTimeSource` to prevent wildcard import issues (#2537) - -### Bug fixes - -* Fixed the problem that prevented implementation via delegation for `Job` interface (#2423) -* Fixed incorrect ProGuard rules that allowed shrinking volatile felds (#1564) -* Fixed `await/`asDeferred` for `MinimalState` implementations in jdk8 module (#2456) -* Fixed bug when `onUndeliveredElement` wasn't called for unlimited channels (#2435) -* Fixed a bug when `ListenableFuture.isCancelled` returned from `asListenableFuture` could have thrown an exception, thanks to @vadimsemenov (#2421) -* Coroutine in `callbackFlow` and `produce` is properly cancelled when the channel was closed separately (#2506) - - -## Version 1.4.2 - -* Fixed `StackOverflowError` in `Job.toString` when `Job` is observed in its intermediate state (#2371). -* Improved liveness and latency of `Dispatchers.Default` and `Dispatchers.IO` in low-loaded mode (#2381). -* Improved performance of consecutive `Channel.cancel` invocations (#2384). -* `SharingStarted` is now `fun` interface (#2397). -* Additional lint settings for `SharedFlow` to catch programmatic errors early (#2376). -* Fixed bug when mutex and semaphore were not released during cancellation (#2390, thanks to @Tilps for reproducing). -* Some corner cases in cancellation propagation between coroutines and listenable futures are repaired (#1442, thanks to @vadimsemenov). -* Fixed unconditional cast to `CoroutineStackFrame` in exception recovery that triggered failures of instrumented code (#2386). -* Platform-specific dependencies are removed from `kotlinx-coroutines-javafx` (#2360). - ## Version 1.4.1 This is a patch release with an important fix to the `SharedFlow` implementation. @@ -263,12 +225,12 @@ Gradle version 5.3 or later to use this version of kotlinx.coroutines in your Ko This version is the first stable release with [`Flow`](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html) API. All `Flow` API not marked with `@FlowPreview` or `@ExperimentalCoroutinesApi` annotations are stable and here to stay. -Flow declarations marked with `@ExperimentalCoroutinesApi` have [the same guarantees](/docs/topics/compatibility.md#experimental-api) as regular experimental API. -Please note that API marked with `@FlowPreview` have [weak guarantees](/docs/topics/compatibility.md#flow-preview-api) on source, binary and semantic compatibility. +Flow declarations marked with `@ExperimentalCoroutinesApi` have [the same guarantees](/docs/compatibility.md#experimental-api) as regular experimental API. +Please note that API marked with `@FlowPreview` have [weak guarantees](/docs/compatibility.md#flow-preview-api) on source, binary and semantic compatibility. ### Changelog -* A new [guide section](/docs/topics/flow.md) about Flow. +* A new [guide section](/docs/flow.md) about Flow. * `CoroutineDispatcher.asExecutor` extension (#1450). * Fixed bug when `select` statement could report the same exception twice (#1433). * Fixed context preservation in `flatMapMerge` in a case when collected values were immediately emitted to another flow (#1440). @@ -409,11 +371,11 @@ A lot of `Flow` improvements: * `flatMap`, `merge` and `concatenate` are replaced with `flattenConcat`, `flattenMerge`, `flatMapConcat` and `flatMapMerge`. * Various documentation improvements and minor bug fixes. -Note that `Flow` **is not** leaving its [preview status](/docs/topics/compatibility.md#flow-preview-api). +Note that `Flow` **is not** leaving its [preview status](/docs/compatibility.md#flow-preview-api). ## Version 1.2.0-alpha-2 -This release contains major [feature preview](/docs/topics/compatibility.md#flow-preview-api): cold streams aka `Flow` (#254). +This release contains major [feature preview](/docs/compatibility.md#flow-preview-api): cold streams aka `Flow` (#254). Performance: * Performance of `Dispatcher.Main` initialization is significantly improved (#878). @@ -536,7 +498,7 @@ Maintenance release: * `Job()` wih parent now also cancels parent on failure consistently with other scopes. * All coroutine builders and `Job` implementations propagate failure to the parent unless it is a `CancellationException`. * Note, "scoping" builders don't "cancel the parent" verbatim, but rethrow the corresponding exception to the caller for handling. - * `SupervisorJob()` and `supervisorScope { ... }` are introduced, allowing for a flexible implementation of custom exception-handling policies, see a [new section in the guide on supervision](docs/topics/exception-handling.md#supervision). + * `SupervisorJob()` and `supervisorScope { ... }` are introduced, allowing for a flexible implementation of custom exception-handling policies, see a [new section in the guide on supervision](docs/exception-handling.md#supervision). * Got rid of `awaitAll` in documentation and rewrote `currentScope` section (see #624). * **[Major]** Coroutine scheduler is used for `Dispatchers.Default` by default instead of deprecated `CommonPool`. * "`DefaultDispatcher`" is used as a public name of the default impl (you'll see it thread names and in the guide). @@ -595,7 +557,7 @@ Visible consequences of include more robust exception handling for large corouti * `currentScope` and `coroutineScope` builders are introduced to extract and provide `CoroutineScope`. * Factory methods to create `CoroutineScope` from `CoroutineContext` are introduced. * `CoroutineScope.isActive` became an extension property. - * New sections about structured concurrency in core guide: ["Structured concurrency"](docs/topics/coroutines-guide.md#structured-concurrency), ["Scope builder"](docs/topics/coroutines-guide.md#scope-builder) and ["Structured concurrency with async"](docs/topics/coroutines-guide.md#structured-concurrency-with-async). + * New sections about structured concurrency in core guide: ["Structured concurrency"](docs/coroutines-guide.md#structured-concurrency), ["Scope builder"](docs/coroutines-guide.md#scope-builder) and ["Structured concurrency with async"](docs/coroutines-guide.md#structured-concurrency-with-async). * New section in UI guide with Android example: ["Structured concurrency, lifecycle and coroutine parent-child hierarchy"](ui/coroutines-guide-ui.md#structured-concurrency,-lifecycle-and-coroutine-parent-child-hierarchy). * Deprecated reactive API is removed. * Dispatchers are renamed and grouped in the Dispatchers object (see #41 and #533): @@ -615,7 +577,7 @@ Visible consequences of include more robust exception handling for large corouti ## Version 0.25.0 * Major rework on exception-handling and cancellation in coroutines (see #333, #452 and #451): - * New ["Exception Handling" section in the guide](docs/topics/coroutines-guide.md#exception-handling) explains exceptions in coroutines. + * New ["Exception Handling" section in the guide](docs/coroutines-guide.md#exception-handling) explains exceptions in coroutines. * Semantics of `Job.cancel` resulting `Boolean` value changed — `true` means exception was handled by the job, caller shall handle otherwise. * Exceptions are properly propagated from children to parents. * Installed `CoroutineExceptionHandler` for a family of coroutines receives one aggregated exception in case of failure. @@ -624,7 +586,7 @@ Visible consequences of include more robust exception handling for large corouti * Introduced support for thread-local elements in coroutines context (see #119): * `ThreadContextElement` API for custom thread-context sensitive context elements. * `ThreadLocal.asContextElement()` extension function to convert an arbitrary thread-local into coroutine context element. - * New ["Thread-local data" subsection in the guide](docs/topics/coroutines-guide.md#thread-local-data) with examples. + * New ["Thread-local data" subsection in the guide](docs/coroutines-guide.md#thread-local-data) with examples. * SLF4J Mapped Diagnostic Context (MDC) integration is provided via `MDCContext` element defined in [`kotlinx-coroutines-slf4j`](integration/kotlinx-coroutines-slf4j/README.md) integration module. * Introduced IO dispatcher to offload blocking I/O-intensive tasks (see #79). * Introduced `ExecutorCoroutineDispatcher` instead of `CloseableCoroutineDispatcher` (see #385). @@ -857,7 +819,7 @@ Visible consequences of include more robust exception handling for large corouti * Fixed `actor` and `produce` so that a cancellation of a Job cancels the underlying channel (closes and removes all the pending messages). * Fixed sporadic failure of `example-context-06` (see #160) * Fixed hang of `Job.start` on lazy coroutine with attached `invokeOnCompletion` handler. -* A more gradual introduction to `runBlocking` and coroutines in the [guide](docs/topics/coroutines-guide.md) (see #166). +* A more gradual introduction to `runBlocking` and coroutines in the [guide](docs/coroutines-guide.md) (see #166). ## Version 0.19.3 @@ -908,7 +870,7 @@ Visible consequences of include more robust exception handling for large corouti * When a context is explicitly specified, `newCoroutineContext` function checks if there is any interceptor/dispatcher defined in the context and uses `DefaultDispatcher` if there is none. * `DefaultDispatcher` is currently defined to be equal to `CommonPool`. - * Examples in the [guide](docs/topics/coroutines-guide.md) now start with `launch { ... }` code and explanation on the nature + * Examples in the [guide](docs/coroutines-guide.md) now start with `launch { ... }` code and explanation on the nature and the need for coroutine context starts in "Coroutine context and dispatchers" section. * Parent coroutines now wait for their children (see #125): * Job _completing_ state is introduced in documentation as a state in which parent coroutine waits for its children. @@ -968,7 +930,7 @@ Visible consequences of include more robust exception handling for large corouti ## Version 0.17 * `CompletableDeferred` is introduced as a set-once event-like communication primitive (see #70). - * [Coroutines guide](docs/topics/coroutines-guide.md) uses it in a section on actors. + * [Coroutines guide](docs/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 `Deferred.await` wait until a cancelled coroutine stops execution (see #64). @@ -1114,7 +1076,7 @@ Visible consequences of include more robust exception handling for large corouti * `actor` coroutine builder. * Couple more examples for "Shared mutable state and concurrency" section and "Channels are fair" section with ping-pong table example - in [coroutines guide](docs/topics/coroutines-guide.md). + in [coroutines guide](docs/coroutines-guide.md). ## Version 0.11-rc @@ -1122,7 +1084,7 @@ Visible consequences of include more robust exception handling for large corouti * `Mutex` is moved to `kotlinx.coroutines.sync` package. * `ClosedSendChannelException` is a subclass of `CancellationException` now. * New sections on "Shared mutable state and concurrency" and "Select expression" - in [coroutines guide](docs/topics/coroutines-guide.md). + in [coroutines guide](docs/coroutines-guide.md). ## Version 0.10-rc @@ -1150,7 +1112,7 @@ Visible consequences of include more robust exception handling for large corouti So, lazy coroutines do not need a separate state variable to track their started/not-started (new/active) status. * Exception transparency in `Job.cancel` (original cause is rethrown). * Clarified possible states for `Job`/`CancellableContinuation`/`Deferred` in docs. -* Example on async-style functions and links to API reference site from [coroutines guide](docs/topics/coroutines-guide.md). +* Example on async-style functions and links to API reference site from [coroutines guide](docs/coroutines-guide.md). ## Version 0.7-beta @@ -1158,12 +1120,12 @@ Visible consequences of include more robust exception handling for large corouti `RendezvousChannel` and `ArrayChannel` implementations, `Channel()` factory function and `buildChannel{}` coroutines builder. * `Here` context is renamed to `Unconfined` (the old name is deprecated). -* A [guide on coroutines](docs/topics/coroutines-guide.md) is expanded: sections on contexts and channels. +* A [guide on coroutines](docs/coroutines-guide.md) is expanded: sections on contexts and channels. ## Version 0.6-beta * Switched to Kotlin version 1.1.0-beta-37. -* A [guide on coroutines](docs/topics/coroutines-guide.md) is expanded. +* A [guide on coroutines](docs/coroutines-guide.md) is expanded. ## Version 0.5-beta @@ -1176,7 +1138,7 @@ Visible consequences of include more robust exception handling for large corouti has a default implementation that returns `true`. * `NonCancellable` context is introduced. * Performance optimizations for cancellable continuations (fewer objects created). -* A [guide on coroutines](docs/topics/coroutines-guide.md) is added. +* A [guide on coroutines](docs/coroutines-guide.md) is added. ## Version 0.4-beta |