kotlinx.coroutines v1.3.3 Release Notes
-
Flow
- ๐
Flow.take
performance is significantly improved (#1538). - ๐
Flow.merge
operator (#1491). - Reactive Flow adapters are promoted to stable API (#1549).
- ๐ Reusable cancellable continuations were introduced that improved the performance of various flow operators and iteration over channels (#1534).
- ๐ Fixed interaction of multiple flows with
take
operator (#1610). - ๐ Throw
NoSuchElementException
instead ofUnsupportedOperationException
for emptyFlow
inreduce
operator (#1659). onCompletion
now rethrows downstream exceptions on emit attempt (#1654).- ๐ Allow non-emitting
withContext
fromflow
builder (#1616).
Debugging
- โก๏ธ
DebugProbes.dumpCoroutines
is optimized to be able to print the 6-digit number of coroutines (#1535). - Properly capture unstarted lazy coroutines in debugger (#1544).
- โ
Capture coroutines launched from within a test constructor with
CoroutinesTimeout
test rule (#1542). - ๐ท Stacktraces of
Job
-related coroutine machinery are shortened and prettified (#1574). - Stacktrace recovery unification that should provide a consistent experience recover of stacktrace (#1597).
- ๐ Stacktrace recovery for
withTimeout
is supported (#1625). - ๐ป Do not recover exception with a single
String
parameter constructor that is not amessage
(#1631).
Other features
- 0๏ธโฃ
Dispatchers.Default
andDispatchers.IO
rework: CPU consumption is significantly lower, predictable idle threads termination (#840, #1046, #1286). - Avoid
ServiceLoader
for loadingDispatchers.Main
(#1572, #1557, #878, #1606). - Consistently handle undeliverable exceptions in RxJava and Reactor integrations (#252, #1614).
- ๐
yield
support in immediate dispatchers (#1474). CompletableDeferred.completeWith(result: Result<T>)
is introduced.- โ Added support for tvOS and watchOS-based Native targets (#1596).
๐ Bug fixes and improvements
- โก๏ธ Kotlin version is updated to 1.3.61.
CoroutineDispatcher.isDispatchNeeded
is promoted to stable API (#1014).- ๐ Livelock and stackoverflows in mutual
select
expressions are fixed (#1411, #504). - Properly handle
null
values inListenableFuture
integration (#1510). - Making ReceiveChannel.cancel linearizability-friendly.
- Linearizability of Channel.close in a complex contended cases (#1419).
- ๐ ArrayChannel.isBufferEmpty atomicity is fixed (#1526).
- ๐ Various documentation improvements.
- โฌ๏ธ Reduced bytecode size of
kotlinx-coroutines-core
, reduced size of minifieddex
when using basic functionality ofkotlinx-coroutines
.
- ๐