All Versions
Latest Version
Avg Release Cycle
Latest Release

Changelog History
Page 4

  • v1.3.0-M1 Changes


    • Core Flow interfaces and operators are graduated from preview status to experimental.
    • Context preservation invariant rework (#1210).
      • channelFlow and callbackFlow replacements for flowViaChannel for concurrent flows or callback-based APIs.
      • flow prohibits emissions from non-scoped coroutines by default and recommends to use channelFlow instead to avoid most of the concurrency-related bugs.
    • Flow cannot be implemented directly
      • AbstractFlow is 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)
      • buffer operator can be used to adjust buffer size of any buffer-dependent operator (e.g. channelFlow, flowOn and flatMapMerge).
      • conflate operator is introduced.
    • Flow performance is significantly improved.
    • New operators: scan, scanReduce, first, emitAll.
    • flowWith and flowViaChannel are deprecated.
    • retry ignores cancellation exceptions from upstream when the flow was externally cancelled (#1122).
    • combineLatest overloads for multiple flows (#1193).
    • Fixed numerical overflow in drop operator.


    • consumeEach is promoted to experimental API (#1080).
    • Conflated channels always deliver the latest value after closing (#332, #1235).
    • Non-suspending to improve iteration performance (#1162).
    • Channel exception types are consistent with produce and 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 Flow.

    General changes:

    • Kotlin updated to 1.3.31
    • Semaphore implementation (#1088)
    • Loading of Dispatchers.Main is 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).
    • withContext checks cancellation status on exit to make reasoning about sequential concurrent code easier (#1177).
    • Consistent exception handling mechanism for complex hierarchies (#689).
    • Convenient overload for CoroutinesTimeout.seconds (#1184).
    • Fix cancellation bug in onJoin (#1130).
    • Prevent internal names clash that caused errors for ProGuard (#1159).
    • POSIX's nanosleep as delay in runBlocking in K/N (#1225).
  • v1.2.2 Changes

    • โšก๏ธ Kotlin updated to 1.3.40.
  • v1.2.1 Changes


    • Infrastructure for testing coroutine-specific code in kotlinx-coroutines-test: runBlockingTest, TestCoroutineScope and TestCoroutineDispatcher, contributed by Sean McQuillan (@objcode). Obsolete TestCoroutineContext from kotlinx-coroutines-core is deprecated.
    • Job.asCompletableFuture extension in jdk8 module (#1113).

    Flow improvements:

    • flowViaChannel rework: block parameter is no longer suspending, but provides CoroutineScope receiver and allows conflated channel (#1081, #1112).
    • New operators: switchMap, sample, debounce (#1107).
    • consumerEach is deprecated on Publisher, ObservableSource and MaybeSource, collect extension is introduced instead (#1080).


    • Race in Job.join and concurrent cancellation is fixed (#1123).
    • Stacktrace recovery machinery improved: cycle detection works through recovered exceptions, cancellation exceptions are recovered on cancellation fast-path.
    • Atomicfu-related bug fixes: publish transformed artifacts, do not propagate transitive atomicfu dependency (#1064, #1116).
    • Publication to NPM fixed (#1118).
    • Misplaced resources are removed from the final jar (#1131).
  • v1.2.0 Changes

    • Kotlin updated to 1.3.30.
    • New API: CancellableContinuation.resume with onCancelling lambda (#1044) to consistently handle closeable resources.
    • Play services task version updated to 16.0.1.
    • ReceiveChannel.isEmpty is no longer deprecated

    A lot of Flow improvements:

    • Purity property is renamed to context preservation and became more restrictive.
    • zip and combineLatest operators.
    • Integration with RxJava2
    • flatMap, merge and concatenate are replaced with flattenConcat, flattenMerge, flatMapConcat and flatMapMerge.
    • Various documentation improvements and minor bug fixes.

    Note that Flow is not leaving its preview status.

  • v1.2.0-alpha Changes

    • ๐Ÿ”€ Major debug agent improvements. Real stacktraces are merged with coroutine stacktraces for running coroutines, merging heuristic is improved, API is cleaned up and is on its road to stabilization (#997).
    • CoroutineTimeout rule or JUnit4 is introduced to simplify coroutines debugging (#938).
    • ๐Ÿ“„ Stacktrace recovery improvements. Exceptions with custom properties are no longer copied, CopyableThrowable interface is introduced, machinery is documented (#921, #950).
    • Dispatchers.Unconfined, MainCoroutineDispatcher.immediate, MainScope and CoroutineScope.cancel are promoted to stable API (#972).
    • ๐Ÿ‘ท CompletableJob is introduced (#971).
    • Structured concurrency is integrated into futures and listenable futures (#1008).
    • ensurePresent and isPresent extensions for ThreadLocal (#1028).
    • ๐Ÿ‘ท ensureActive extensions for CoroutineContext, CoroutineScope and Job (#963).
    • ๐Ÿ—„ SendChannel.isFull and ReceiveChannel.isEmpty are deprecated (#1053).
    • withContext checks cancellation on entering (#962).
    • Operator invoke on CoroutineDispatcher (#428).
    • Java 8 extensions for delay and withTimeout now properly handle too large values (#428).
    • ๐Ÿ‘ป A global exception handler for fatal exceptions in coroutines is introduced (#808, #773).
    • ๐Ÿšš Major improvements in cancellation machinery and exceptions delivery consistency. Cancel with custom exception is completely removed.
    • โšก๏ธ Kotlin version is updated to 1.3.21.
    • Do not use private API on newer Androids to handle exceptions (#822).

    ๐Ÿ› Bug fixes:

    • ๐Ÿ‘ Proper select support in debug agent (#931).
    • ๐Ÿ‘ Proper supervisorScope support in debug agent (#915).
    • Throwing initCause does no longer trigger an internal error (#933).
    • Lazy actors are started when calling close in order to cleanup their resources (#939).
    • ๐Ÿ›  Minor bugs in reactive integrations are fixed (#1008).
    • โฑ Experimental scheduler shutdown sequence is fixed (#990).
  • v1.1.1 Changes

    • ๐Ÿš€ Maintenance release, no changes in the codebase
    • โšก๏ธ Kotlin is updated to 1.3.20
    • โšก๏ธ Gradle is updated to 4.10
    • ๐Ÿ“‡ Native module is published with Gradle metadata v0.4
  • v1.1.0 Changes

    • โšก๏ธ Kotlin version updated to 1.3.11.
    • Resumes to CancellableContinuation in the final state produce IllegalStateException (#901). This change does not affect #830, races between resume and cancellation do not lead to an exceptional situation.
    • runBlocking is integrated with Dispatchers.Unconfined by sharing an internal event loop. This change does not affect the semantics of the previously correct code but allows to mix multiple runBlocking and unconfined tasks (#860).
  • v1.1.0-alpha Changes

    โœ… 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 arbitrary Dispatchers.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 and CoroutineScope.cancel extension (#829). One line CoroutineScope integration!
    • ๐Ÿ‘ป CancellableContinuation race between resumeWithException and cancel 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 by withTimeout instead of CancellationException 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.
  • v1.0.1 Changes

    • Align publisher implementation with Reactive TCK.
    • ๐Ÿ— Reimplement future coroutine builders on top of AbstractCoroutine (#751).
    • ๐ŸŽ Performance optimizations in Dispatchers.Default and Dispatchers.IO.
    • ๐Ÿ— Use only public API during JavaFx instantiation, fixes warnings on Java 9 and build on Java 11 (#463).
    • ๐Ÿ“š Updated contract of CancellableContinuation.resumeWithException (documentation fix, see #712).
    • ๐Ÿ— Check cancellation on fast-path of all in-place coroutine builders (withContext, coroutineScope, supervisorScope, withTimeout and withTimeoutOrNull).
    • โž• Add optional prefix to thread names of ExperimentalCoroutineDispatcher (#661).
    • ๐Ÿ›  Fixed bug when ExperimentalCoroutineDispatcher could end up in inconsistent state if Thread constructor throws an exception (#748).
  • v1.0.0 Changes

    • ๐Ÿš€ All Kotlin dependencies updated to 1.3 release version.
    • ๐Ÿ›  Fixed potential memory leak in HandlerDispatcher.scheduleResumeAfterDelay, thanks @cbeyls.
    • ๐Ÿ‘ yield support for Unconfined and immediate dispatchers (#737).
    • ๐Ÿ“š Various documentation improvements.