Skip to content

Commit eccc5ea

Browse files
committed
Migrate from the deprecated native atomics
This commit is required for the aggregate build that checks the change of deprecation level for native atomics (https://jetbrains.team/p/kt/reviews/10650/timeline). Usages of native atomics from kotlin.native.concurrent package are replaced with new atomics from kotlin.concurrent because old native atomics will be deprecated with error. NOTE: this commit is not present in develop branch, because new kotlin.concurrent atomics are only available since Kotlin 1.9.0. IT SHOULD BE REMOVED after kotlinx.coroutines updates Kotlin version to 1.9.0.
1 parent 53aa580 commit eccc5ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

kotlinx-coroutines-core/native/src/MultithreadedDispatchers.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import kotlinx.atomicfu.*
88
import kotlinx.coroutines.channels.*
99
import kotlinx.coroutines.internal.*
1010
import kotlin.coroutines.*
11-
import kotlin.native.concurrent.*
11+
import kotlin.concurrent.AtomicReference
12+
import kotlin.native.concurrent.Worker
1213

1314
@ExperimentalCoroutinesApi
1415
public actual fun newSingleThreadContext(name: String): CloseableCoroutineDispatcher {

kotlinx-coroutines-core/nativeDarwin/src/Dispatchers.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import kotlinx.cinterop.*
88
import platform.CoreFoundation.*
99
import platform.darwin.*
1010
import kotlin.coroutines.*
11-
import kotlin.native.concurrent.*
11+
import kotlin.concurrent.*
1212
import kotlin.native.internal.NativePtr
1313

1414
internal fun isMainThread(): Boolean = CFRunLoopGetCurrent() == CFRunLoopGetMain()

0 commit comments

Comments
 (0)