kotlinx.coroutines
kotlinx.coroutines copied to clipboard
Library support for Kotlin coroutines
Chrome is aiming to implement [a `console.createTask()` method](https://developer.chrome.com/en/blog/devtools-modern-web-debugging/#linked-stack-traces) that allows the debugger to link the source of an asynchronous call to its target (e.g. the stacktraces go across asynchronous boundaries)....
Similar to: ``` launch { // parent launch { // child ... } } ``` Given a parent scope, I'd like to be able to attach a child to it....
We're trying to build a 32 bit version for our Kotlin Native Project and would love to support 32 bit. Is this possible right now?
``` @OptIn(InternalCoroutinesApi::class) @Suppress("DEPRECATION_ERROR", "INVISIBLE_MEMBER") fun main() { runBlocking { launch(SupervisorJob()) { // failed child cancels parent, // which turns out not to be a supervisor, // but a regular StandaloneCoroutine...
I've managed to dump the full parent-child tree via internal APIs (https://github.com/Kotlin/kotlinx.coroutines/issues/3427), and I've discovered, that the coroutine name is not attached to the `Job` created by `CoroutineScope`. The name...
``` package kotlinx.coroutines.scheduling import kotlinx.coroutines.* import kotlinx.coroutines.scheduling.CoroutineScheduler.Companion.MAX_SUPPORTED_POOL_SIZE import org.junit.* import java.util.concurrent.* import java.util.concurrent.atomic.AtomicInteger class CoroutineSchedulerOversubscriptionStressTest : TestBase() { private val poolSize = Runtime.getRuntime().availableProcessors() private val inDefault = AtomicInteger(0) fun doCheck()...
We should hand it directly to the stealing worker without intermediate stores. Apart from code being more straightforward, it also saves us at least 2 CASes on a fairly contended...
``` import kotlin.coroutines.CoroutineContext import kotlinx.coroutines.job import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withContext import kotlinx.coroutines.ThreadContextElement class MyElement : ThreadContextElement { companion object Key : CoroutineContext.Key override val key: CoroutineContext.Key get() = Key override fun...
I'm creating a diagnostic tool which collects minimal info about coroutines to be later queried and printed in an acceptable format. I want to collect `CoroutineContext`, `CoroutineStackFrame` and current thread,...