kotlinx.coroutines v0.16 Release Notes
-
- ⏱ Coroutines that are scheduled for execution are cancellable by default now
suspendAtomicCancellableCoroutine
function is introduced for funs likesend
/receive
/receiveOrNull
that require atomic cancellation (they cannot be cancelled after decision was made)- Coroutines started with default mode using
🏗
async
/launch
/actor
builders can be cancelled before their execution starts CoroutineStart.ATOMIC
is introduced as a start mode to specify that coroutine cannot be cancelled before its execution startsrun
function is also cancellable in the same way and accepts an optionalCoroutineStart
parameter to change this default.
BroadcastChannel
factory function is introducedCoroutineExceptionHandler
factory function is introduced by @konrad-kaminski- [
integration
](integration) directory is introduced for all 3rd party integration projects- It has [contribution guidelines](integration/README.md#contributing) and contributions from community are welcome
- Support for Guava
ListenableFuture
in the new [kotlinx-coroutines-guava
](integration/kotlinx-coroutines-guava) module - Rx1 Scheduler support by @konrad-kaminski
- 🛠 Fixed a number of
Channel
andBroadcastChannel
implementation bugs related to concurrent send/close/close of channels that lead to hanging send, offer or close operations (see #66). Thanks to @chrisly42 and @cy6erGn0m for finding them. - 🛠 Fixed
withTimeoutOrNull
which was returningnull
on timeout of inner or outerwithTimeout
blocks (see #67). Thanks to @gregschlom for finding the problem. - 🛠 Fixed a bug where
Job
fails to dispose a handler when it is the only handler by @uchuhimo
- ⏱ Coroutines that are scheduled for execution are cancellable by default now