kotlinx.coroutines
kotlinx.coroutines copied to clipboard
Library support for Kotlin coroutines
See #1315 for one of the use-cases. Note, that is operator can be implemented in a quite a straightforward way using stable `Flow` APIs. The simple implementation is given below:...
**Use case** A very common pattern I see very often in codebases is having a bunch of independent read-only operations that are pre-requisites to one write operation. Since the read-only...
This is unexpected that `await` cancels the `CompletableFuture` on coroutine cancellation. Since it's named like `Deferred.await`, it's expected to behave the same way without requiring to convert to `Deferred` first.
Consider a flow like ```kotlin flowOf(1).sharedIn(scope, start) ``` It seems reasonable that each subscriber could know that no more data will be coming. I'm wondering about the design decision behind...
In the current version of the library, `withTimeout` throws `TimeoutCancellationException` when a timeout was exceeded. It can lead to very subtle errors, for example: ``` launch { val result =...
We used to use our custom implementation to run some important cleaning procedure on applicationWillTerminate event on iOS. The procedure requires suspend func invocation, so we use custom runblocking that...
**Describe the bug** I have a piece of production code which uses `ListenableFuture.future()` to bridge the gap between blocking code and code using coroutines. In essence the code using coroutines...
https://github.com/Kotlin/kotlinx.coroutines/blob/master/docs/topics/debugging.md only lists debugging capabilities, but they are not available anywhere but the JVM.
During K2 migration, this flag was temporarily disabled. We have to do the following: * Fixup all the warnings, report to compiler any UX issues w.r.t. that * Enabled it...
Originally, it was added as a proof-of-concept of "disjoint polymorphism" in coroutine context elements: https://youtrack.jetbrains.com/issue/KT-36118 In short, for the polymorphic type hierarchy (e.g. `ContinuationInterceptor` -> `CoroutineDispatcher` -> `ExecutorCoroutineDispatcher`) it enables...