Skip to content

Commit 12a0318

Browse files
committed
Use common ThreadLocal declaration from stdlib
1 parent 60f8688 commit 12a0318

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

kotlinx-coroutines-core/common/src/EventLoop.common.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ internal abstract class EventLoop : CoroutineDispatcher() {
118118
protected open fun shutdown() {}
119119
}
120120

121-
@NativeThreadLocal
121+
@ThreadLocal
122122
internal object ThreadLocalEventLoop {
123123
private val ref = CommonThreadLocal<EventLoop?>()
124124

kotlinx-coroutines-core/common/src/internal/ThreadLocal.common.kt

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
/*
2-
* Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
package kotlinx.coroutines.internal
66

7-
@OptionalExpectation
8-
@UseExperimental(ExperimentalMultiplatform::class)
9-
internal expect annotation class NativeThreadLocal()
10-
117
internal expect class CommonThreadLocal<T>() {
128
fun get(): T
139
fun set(value: T)

0 commit comments

Comments
 (0)