kotlinx.coroutines v1.4.0-M1 Release Notes
💥 Breaking changes
- 🚚 The concept of atomic cancellation in channels is removed. All operations in channels
Flowoperators are cancellable in non-atomic way (#1813).
- ⏱ If
RejectedExecutionException, cancel current
Joband schedule its execution to
CancellableContinuation.invokeOnCancellationis invoked if the continuation was cancelled while its resume has been dispatched (#1915).
Flow.singleOrNulloperator is aligned with standard library and does not longer throw
IllegalStateExceptionon multiple values (#2289).
🆕 New experimental features
SharedFlowprimitive for managing hot sources of events with support of various subscription mechanisms, replay logs and buffering (#2034).
Flow.stateInoperators to transform cold instances of flow to hot
- 👌 Support leak-free closeable resources transfer via
onUndeliveredElementin channels (#1936).
- 🔄 Changed ABI in reactive integrations for Java interoperability (#2182).
- 🛠 Fixed ProGuard rules for
- 👕 Lint settings were added to
Flowto avoid accidental capturing of outer
CoroutineScopefor cancellation check (#2038).
- 👍 Allow nullable types in
Flow.singleOrNullby @ansman (#2229).
- ➕ Add
Publisher.awaitSingleOrDefault|Null|Elseextensions by @sdeleuze (#1993).
awaitCancellationtop-level function by @LouisCAD (#2213).
- 🏗 Significant part of our Gradle build scripts were migrated to
Thank you for your contributions and participation in the Kotlin community!
- 🚚 The concept of atomic cancellation in channels is removed. All operations in channels and corresponding