kotlinx.coroutines
kotlinx.coroutines copied to clipboard
Library support for Kotlin coroutines
I need a `CompletableJob` (and/or `CompletableDeferred`) such that: - its parent propagates cancellation down to it; - its parent waits for completion of it; - it does not cancel its...
It makes sense that `Flow` and all `map` operations are sequential by default, but it makes sense to allow some *heavy* operations to be performed in parallel on explicitly provided...
Calling a function containing atomic operations from a different file results in the failure of Native incremental compilation. Made `BufferedChannel#sendImpl` function private. This is a WA for [KT-65554](https://youtrack.jetbrains.com/issue/KT-65554/atomicfu-K-N-Plugin-generates-IrGetField-from-another-file) Maybe we...
Workaround for KT-64075
**Tl;dr - Coroutines seem to have a trade-off between performing extra thread switches versus using `Dispatchers.Unconfined`, and there doesn’t appear to be an ideal solution** We’re creating a set of...
`kotlinx.coroutines` provides a [stacktrace recovery](https://github.com/Kotlin/kotlinx.coroutines/blob/master/docs/topics/debugging.md#stacktrace-recovery) machinery in order to provide complete stacktraces that preserve information about all suspended functions in the stracktrace. But the exception recovery only works through coroutine...
**Use case** This a contrived example. ``` class MyCheckBox(cs: CoroutineScope, initialValue: Boolean): JCheckBox() { private val vm = MutableStateFlow(initialValue) // view model init { [email protected] = initialValue cs.launch { vm.collectLatest...
We detected high CPU usage on `kotlinx.coroutines.flow.SharedFlowImpl` using Java Flight Recorder on a 2 CPU machine. The consumed CPU was two order of magnitude than others, neither other code looks...
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-subclass-opt-in-required/ Historically, we have multiple interfaces that are not designed for external implementation, , but are not `sealed` for various reasons (including historical ones): * `Job` should not be extended...
Currently this library allows to define how a coroutine have to start (using `start` parameter) and its dependency fail behavior (using jobs). According to structured concurrency it assumes that all...