Home
last modified time | relevance | path

Searched refs:asContextElement (Results 1 – 6 of 6) sorted by relevance

/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/
DThreadLocalTest.kt27 val deferred = async(Dispatchers.Default + stringThreadLocal.asContextElement("value")) { in <lambda>()
49 val deferred = async(Dispatchers.Default + intThreadLocal.asContextElement(239)) { in <lambda>()
68 …+ intThreadLocal.asContextElement(value = 239) + stringThreadLocal.asContextElement(value = "pew")… in <lambda>()
92 val deferred = GlobalScope.async(intThreadLocal.asContextElement(1)) { in <lambda>()
95 withContext(executor + intThreadLocal.asContextElement(42)) { in <lambda>()
101 val deferred = async(intThreadLocal.asContextElement(53)) { in <lambda>()
125 + stringThreadLocal.asContextElement("initial")) { in <lambda>()
130 withContext(executor + stringThreadLocal.asContextElement("ctx")) { in <lambda>()
134 val deferred = async(stringThreadLocal.asContextElement("async")) { in <lambda>()
157 + myCounterLocal.asContextElement(Counter(0))) { in <lambda>()
[all …]
/external/kotlinx.coroutines/benchmarks/src/jmh/kotlin/benchmarks/
DChannelSinkBenchmark.kt24 private val unconfinedOneElement = Dispatchers.Unconfined + tl.asContextElement() in <lambda>()
25 …val unconfinedTwoElements = Dispatchers.Unconfined + tl.asContextElement() + tl2.asContextElement() in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/guide/
Dexample-context-11.kt15 val job = launch(Dispatchers.Default + threadLocal.asContextElement(value = "launch")) { in <lambda>()
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/src/
DThreadContextElement.kt136 public fun <T> ThreadLocal<T>.asContextElement(value: T = get()): ThreadContextElement<T> = in updateThreadContext() method
/external/kotlinx.coroutines/kotlinx-coroutines-core/api/
Dkotlinx-coroutines-core.api520 …public static final fun asContextElement (Ljava/lang/ThreadLocal;Ljava/lang/Object;)Lkotlinx/corou…
521 …public static synthetic fun asContextElement$default (Ljava/lang/ThreadLocal;Ljava/lang/Object;ILj…
/external/kotlinx.coroutines/
DCHANGES.md588 …* `ThreadLocal.asContextElement()` extension function to convert an arbitrary thread-local into co…