Home
last modified time | relevance | path

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

/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/
DThreadLocalTest.kt15 private val intThreadLocal = ThreadLocal<Int?>() constant
32 assertFailsWith<IllegalStateException> { intThreadLocal.ensurePresent() } in <lambda>()
47 intThreadLocal.set(42) in <lambda>()
48 assertFalse(intThreadLocal.isPresent()) in <lambda>()
49 val deferred = async(Dispatchers.Default + intThreadLocal.asContextElement(239)) { in <lambda>()
50 assertEquals(239, intThreadLocal.get()) in <lambda>()
52 intThreadLocal.ensurePresent() in <lambda>()
53 assertEquals(239, intThreadLocal.get()) in <lambda>()
55 assertEquals(239, intThreadLocal.get()) in <lambda>()
59 assertEquals(42, intThreadLocal.get()) in <lambda>()
[all …]