kotlinx.coroutines v1.1.0-alpha Release Notes
-
✅ Major improvements in coroutines testing and debugging
- 🆕 New module:
kotlinx-coroutines-debug
. Debug agent that improves coroutines stacktraces, allows to print all active coroutines and its hierarchies and can be installed as Java agent. - 🆕 New module:
kotlinx-coroutines-test
. Allows setting arbitraryDispatchers.Main
implementation for tests (#810). - 👻 Stacktrace recovery mechanism. Exceptions from coroutines are recovered from current coroutine stacktraces to simplify exception diagnostic. Enabled in debug mode, controlled by
kotlinx.coroutines.debug
system property (#493).
Other improvements
MainScope
factory andCoroutineScope.cancel
extension (#829). One lineCoroutineScope
integration!- 👻
CancellableContinuation
race betweenresumeWithException
andcancel
is addressed, exceptions during cancellation are no longer reported to exception handler (#830, #892). - 0️⃣
Dispatchers.Default
now consumes much less CPU on JVM (#840). - 👍 Better diagnostic and fast failure if an uninitialized dispatcher is used (#880).
- Conflated channel becomes linearizable.
- 🛠 Fixed inconsistent coroutines state when the result of the coroutine had type
DisposableHandle
(#835). - 🛠 Fixed
JavaFx
initialization bug (#816). - ⏱
TimeoutCancellationException
is thrown bywithTimeout
instead ofCancellationException
if negative timeout is supplied (#870). - 👷 Kotlin/Native single-threaded workers support: coroutines can be safely used in multiple independent K/N workers.
- 0️⃣ jsdom support in
Dispatchers.Default
on JS. - rxFlowable generic parameter is now restricted with Any.
- 👍 Guava 27 support in
kotlinx-coroutines-guava
. - Coroutines are now built with progressive mode.
- 📚 Various fixes in the documentation.
- 🆕 New module: