kotlinx.coroutines v0.13 Release Notes
-
- 🆕 New
kotlinx-coroutinex-android
module with AndroidUI
context implementation. - Introduced
whileSelect
convenience function. - Implemented
ConflatedChannel
. - 🗄 Renamed various
toXXX
conversion functions toasXXX
(old names are deprecated). - ⚡️
run
is optimized with fast-path case and no longer hasCoroutineScope
in its block. - 🛠 Fixed dispatching logic of
withTimeout
(removed extra dispatch). - ✅
EventLoop
that is used byrunBlocking
now implements Delay, giving more predictable test behavior. - 🔨 Various refactorings related to resource management and timeouts:
Job.Registration
is renamed toDisposableHandle
.EmptyRegistration
is renamed toNonDisposableHandle
.Job.unregisterOnCompletion
is renamed toJob.disposeOnCompletion
.Delay.invokeOnTimeout
is introduced.withTimeout
now usesDelay.invokeOnTimeout
when available.
- A number of improvement for reactive streams and Rx:
- Introduced
rxFlowable
builder for Rx 2.x. Scheduler.asCoroutineDispatcher
extension for Rx 2.x.- Fixed bug with sometimes missing
onComplete
inpublish
,rxObservable
, andrxFlowable
builders. - Channels that are open for reactive streams are now
Closeable
. - Fixed
CompletableSource.await
and added test for it. - Removed
rx.Completable.await
due to name conflict.
- Introduced
- 🆕 New documentation:
- [Guide to UI programming with coroutines](ui/coroutines-guide-ui.md)
- [Guide to reactive streams with coroutines](reactive/coroutines-guide-reactive.md)
- Code is published to JCenter repository.
- 🆕 New