Home
last modified time | relevance | path

Searched refs:countOrElement (Results 1 – 8 of 8) sorted by relevance

/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/internal/
DThreadContext.kt35 fun (countOrElement: Any?, element: CoroutineContext.Element): Any? { in <anonymous>()
37 val inCount = countOrElement as? Int ?: 1 in <anonymous>()
40 return countOrElement in <anonymous>()
63 internal fun updateThreadContext(context: CoroutineContext, countOrElement: Any?): Any? { in threadContextElements()
65 val countOrElement = countOrElement ?: threadContextElements(context) in threadContextElements() constant
68countOrElement === 0 -> NO_THREAD_ELEMENTS // very fast path when there are no active ThreadContex… in threadContextElements()
70 countOrElement is Int -> { in threadContextElements()
72 context.fold(ThreadState(context, countOrElement), updateState) in threadContextElements()
77 val element = countOrElement as ThreadContextElement<Any?> in threadContextElements()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/
DCoroutineContext.common.kt28 internal expect inline fun <T> withCoroutineContext(context: CoroutineContext, countOrElement: Any?…
29 …nline fun <T> withContinuationContext(continuation: Continuation<*>, countOrElement: Any?, block: …
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/
DCoroutineContext.kt94 internal actual inline fun <T> withCoroutineContext(context: CoroutineContext, countOrElement: Any?… in withCoroutineContext()
95 val oldValue = updateThreadContext(context, countOrElement) in withCoroutineContext()
106 …nline fun <T> withContinuationContext(continuation: Continuation<*>, countOrElement: Any?, block: … in withContinuationContext()
108 val oldValue = updateThreadContext(context, countOrElement) in withContinuationContext()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/flow/internal/
DChannelFlow.kt211 …private val countOrElement = threadContextElements(emitContext) // precompute for fast withContext… constant
215 withContextUndispatched(emitContext, value, countOrElement, emitRef) in emit()
222 countOrElement: Any = threadContextElements(newContext), // can be precomputed for speed in emit()
226 withCoroutineContext(newContext, countOrElement) { in emit()
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/src/internal/
DDispatchedContinuation.kt28 internal val countOrElement = threadContextElements(context) in <lambda>() constant
203 withCoroutineContext(this.context, countOrElement) { in <lambda>()
255 withContinuationContext(continuation, countOrElement) { in <lambda>()
DDispatchedTask.kt90 withContinuationContext(continuation, delegate.countOrElement) { in getSuccessfulResult()
/external/kotlinx.coroutines/kotlinx-coroutines-core/native/src/
DCoroutineContext.kt46 internal actual inline fun <T> withCoroutineContext(context: CoroutineContext, countOrElement: Any?… in withCoroutineContext()
47 …nline fun <T> withContinuationContext(continuation: Continuation<*>, countOrElement: Any?, block: … in withCoroutineContext()
/external/kotlinx.coroutines/kotlinx-coroutines-core/js/src/
DCoroutineContext.kt50 internal actual inline fun <T> withCoroutineContext(context: CoroutineContext, countOrElement: Any?… in withCoroutineContext()
51 …nline fun <T> withContinuationContext(continuation: Continuation<*>, countOrElement: Any?, block: … in withCoroutineContext()