kotlinx.coroutines
kotlinx.coroutines copied to clipboard
Library support for Kotlin coroutines
**Use case** The current `SharedFlow.onSubscription` implementation returns a `SharedFlow`, which means losing type information when calling it from a `StateFlow`. It would be nice to have a `StateFlow.onSubscription` counterpart for...
Both implementations call `console.error` and pass `exception.toString()`, which is basically a name of Exception class + message. In addition, `console.error` prints a stack trace from a call site (not from...
Nothing in the documentation currently spells out that the `block` is guaranteed to run before this function suspends for the first time, which can lead to doubts.
Migrate to new Dokka Gradle Plugin ([migration guide](https://kotlinlang.org/docs/dokka-migration.html)) Based on https://github.com/Kotlin/kotlinx.coroutines/pull/4257 Because of the Gradle task name change, the kotlinlang deploy configuration should also be updated. Related: https://github.com/JetBrains/kotlin-web-site/pull/4845
This is a small step towards deprecating the practice of breaking structured concurrency by passing a `Job` to a coroutine builder. Thanks to @LouisCAD for the idea! See https://github.com/Kotlin/kotlinx.coroutines/issues/3670
To simplify reviewing https://github.com/Kotlin/kotlinx.coroutines/pull/4208, I've rebased the changes provided there into three clearly separated commits. After this PR gets approved, the changes introduced here will be backported to #4208, and...
The latest code snippet in the KDoc is no longer relevant. Coroutines update and restore the thread-local value on every suspension points. The code became irrelevant after 727c38f708c355e325326def66c80dfec7f81ebe (related issue:...
**Use case** I often happen to want to declare a suspending computation meant to be executed later, but do not have access to a scope at that moment. If I...
**Describe the bug** Having a multiplatform project targetting iOS and Android with shared Compose UI, we have observed a situation, where application started on iOS behaves differently than one on...
`UnconfinedTestDispatcher` didn't get the stable treatment in #3622. This is a tracking issue for its stabilization at some point in the future. For us, this is the final remaining unstable...