kotlinx.coroutines
kotlinx.coroutines copied to clipboard
Library support for Kotlin coroutines
This adds functionality similar to the [`timeout()`](http://reactivex.io/documentation/operators/timeout.html) in Rx. This invokes a timeout if the upstream flow doesn't emit after the set period of time, with the option to perform...
60 seconds is a _really_ long time for nothing to happen. It's like an eternity for a CPU, especially one which is skipping delays. I would personally prefer something low...
Currently, `kotlinx-coroutines-debug` unconditionally overwrites any previously installed debug probes, which may lead to various conflicts when more than one agent with `DebugProbes` support is installed. The issue was discovered when...
Implements #3274.
I have noticed the answer on https://github.com/Kotlin/kotlinx.coroutines/issues/2042 and read the concerns expressed in https://github.com/Kotlin/kotlinx.coroutines/issues/2065 which is presented as a solution to this problem. While I concur with the naming challenges...
According to the [doc](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/is-active.html), `isActive` has the following property: >The coroutineContext.isActive expression is a shortcut for coroutineContext[Job]?.isActive == true. See [Job.isActive](https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/is-active.html). It means that, if the `Job` is not present,...
It is often a need to keep regular `delay()` behavior with actual delay, for example: - debugging code that uses time-depending libraries that know nothing of virtual time (e.g. `kotlinx.datetime`)...
(Continuing from https://github.com/Kotlin/kotlinx.coroutines/issues/3246#issuecomment-1123713267) `kotlin-coroutines` 1.6.0 [came with a new API and multiplatform support](https://blog.jetbrains.com/kotlin/2021/12/introducing-kotlinx-coroutines-1-6-0/#kotlinx-coroutines-test-update). Trying to decide between `UnconfinedTestDispatcher` and `StandardTestDispatcher` we saw the need for maybe a new variation that...
https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-main-coroutine-dispatcher/immediate.html states that, if `Dispatchers.Main.immediate` is supported, it behaves like `Dispatchers.Unconfined` when already in the correct execution context; otherwise, it should throw `UnsupportedOperationException`. However, this is not the case for...