You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CompletableDeferred is an interface with private impl (courtesy of @fvasco, see #86).
It extends Deferred interface with complete and completeExceptionally functions.
Job.join and Deferred.await wait until a cancelled coroutine stops execution (see #64).
Job and Deferred have a new cancelling state which they enter on invocation of cancel.
Job.invokeOnCompletion has an additional overload with onCancelling: Boolean parameter to install handlers that are fired as soon as coroutine enters cancelling state as opposed to waiting until it completes.
Internal select implementation is refactored to decouple it from JobSupport internal class and to optimize its state-machine.
Internal AbstractCoroutine class is refactored so that it is extended only by true coroutines, all of which support the new cancelling state.
CoroutineScope.context is renamed to coroutineContext to avoid conflicts with other usages of contextin applications (like Android context, see #75).
BroadcastChannel.open is renamed to openSubscription (see #54).
Fixed StackOverflowError in a convoy of Mutex.unlock invokers with Unconfined dispatcher (see #80).
Fixed SecurityException when trying to use coroutines library with installed SecurityManager.
Fixed a bug in withTimeoutOrNull in case with nested timeouts when coroutine was cancelled before it was ever suspended.
Fixed a minor problem with awaitFirst on reactive streams that would have resulted in spurious stack-traces printed on the console when used with publishers/observables that continue to invoke onNext despite being cancelled/disposed (which they are technically allowed to do by specification).
All factory functions for various interfaces are implemented as top-level functions (affects Job, Channel, BroadcastChannel, Mutex, EventLoop, and CoroutineExceptionHandler). Previous approach of using operator invoke on their companion objects is deprecated.
Nicer-to-use debug toString implementations for coroutine dispatcher tasks and continuations.
A default dispatcher for delay is rewritten and now shares code with EventLoopImpl that is used by runBlocking. It internally supports non-default TimeSource so that delay-using tests can be written with "virtual time" by replacing their time source for the duration of tests (this feature is not available outside of the library).