Flowinterfaces and operators are graduated from preview status to experimental.
- Context preservation invariant rework (#1210).
flowViaChannelfor concurrent flows or callback-based APIs.
flowprohibits emissions from non-scoped coroutines by default and recommends to use
channelFlowinstead to avoid most of the concurrency-related bugs.
- Flow cannot be implemented directly
AbstractFlowis introduced for extension (e.g. for managing state) and ensures all context preservation invariants.
- Buffer size is decoupled from all operators that imply channel usage (#1233)
bufferoperator can be used to adjust buffer size of any buffer-dependent operator (e.g.
conflateoperator is introduced.
- Flow performance is significantly improved.
- New operators:
retryignores cancellation exceptions from upstream when the flow was externally cancelled (#1122).
combineLatestoverloads for multiple flows (#1193).
- Fixed numerical overflow in
consumeEachis promoted to experimental API (#1080).
- Conflated channels always deliver the latest value after closing (#332, #1235).
ChannelIterator.nextto improve iteration performance (#1162).
- Channel exception types are consistent with
produceand are no longer swallowed as cancellation exceptions in case of programmatic errors (#957, #1128).
- All operators on channels (that were prone to coroutine leaks) are deprecated in the favor of
- Kotlin updated to 1.3.31
- Loading of
Dispatchers.Mainis tweaked so the latest version of R8 can completely remove I/O when loading it (#1231).
- Performace of all JS dispatchers is significantly improved (#820).
withContextchecks cancellation status on exit to make reasoning about sequential concurrent code easier (#1177).
- Consistent exception handling mechanism for complex hierarchies (#689).
- Convenient overload for
- Fix cancellation bug in onJoin (#1130).
- Prevent internal names clash that caused errors for ProGuard (#1159).
runBlockingin K/N (#1225).