Skip to content

Releases: Kotlin/kotlinx.coroutines

1.2.0

12 Apr 18:23
Compare
Choose a tag to compare
  • 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.

1.2.0-alpha-2

04 Apr 12:47
d449052
Compare
Choose a tag to compare

This release contains major feature preview: cold streams aka Flow (#254).

Performance:

  • Performance of Dispatcher.Main initialization is significantly improved (#878).

1.2.0-alpha

26 Mar 17:54
085a4cb
Compare
Choose a tag to compare
  • 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 for 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 (#1007).
  • 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).
  • Performance of Dispatcher.Main initialization is significantly improved (#878).
  • 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 clean up their resources (#939).
  • Minor bugs in reactive integrations are fixed (#1008).
  • Experimental scheduler shutdown sequence is fixed (#990).

1.1.1

24 Jan 09:49
Compare
Choose a tag to compare
  • 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

1.1.0

21 Dec 16:05
Compare
Choose a tag to compare

Version 1.1.0

  • Kotlin version updated to 1.3.11.
  • Resumes of 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).

1.1.0-alpha

18 Dec 20:20
Compare
Choose a tag to compare
1.1.0-alpha Pre-release
Pre-release

Version 1.1.0-alpha

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).
  • 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 coroutin es 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.
  • 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.

1.0.1

08 Nov 08:44
Compare
Choose a tag to compare

Version 1.0.1

  • 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).

1.0.0

29 Oct 15:30
ea89e60
Compare
Choose a tag to compare

Version 1.0.0

  • 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.

1.0.0-RC1

19 Oct 20:05
Compare
Choose a tag to compare

Version 1.0.0-RC1

  • Coroutines API is updated to Kotlin 1.3.
  • Deprecated API is removed or marked as internal.
  • Experimental and internal coroutine API is marked with corresponding kotlin.experimental.Experimental annotation. If you are using @ExperimentalCoroutinesApi or @InternalCoroutinesApi you should explicitly opt-in otherwise, compilation warning (or error) will be produced.
  • Unconfined dispatcher (and all dispatchers which support immediate invocation) forms event-loop on top of the current thread, thus preventing all StackOverflowErrors. Unconfined dispatcher is now much safer for the general use and may leave its experimental status soon (#704).
  • Significantly improved performance of suspending hot loops in kotlinx.coroutines (#537).
  • Proguard rules are embedded into coroutines JAR to assist jettifier (#657)
  • Fixed bug in shutdown sequence of runBlocking (#692).
  • ReceiveChannel.receiveOrNull is marked as obsolete and deprecated.
  • Job.cancel(cause) and ReceiveChannel.cancel(cause) are deprecated, cancel() returns Unit (#713).

0.30.2

08 Oct 16:12
Compare
Choose a tag to compare

Version 0.30.2

  • Dispatchers.Main is instantiated lazily (see #658 and #665).
  • Blocking coroutine dispatcher views are now shutdown properly (#678).
  • Prevent leaking Kotlin 1.3 from atomicfu dependency (#659).
  • Thread-pool based dispatcher factories are marked as obsolete (#261).
  • Fixed exception loss on withContext cancellation (#675).