[K/N] Deprecate SharedImmutable annotation #KT-57837
As a part of efforts to stabilize Native stdlib.
This commit is contained in:
committed by
Space Team
parent
0cfb80144a
commit
4ae19b2b44
@@ -9,7 +9,6 @@ package runtime.concurrent.worker_bound_reference0
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.concurrent.SharedImmutable
|
||||
import kotlin.native.*
|
||||
import kotlin.native.ref.WeakReference
|
||||
import kotlin.native.runtime.GC
|
||||
@@ -17,7 +16,6 @@ import kotlin.text.Regex
|
||||
|
||||
class A(var a: Int)
|
||||
|
||||
@SharedImmutable
|
||||
val global1: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -36,7 +34,6 @@ fun testGlobal() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global2: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -67,7 +64,6 @@ fun testGlobalAccessOnWorker() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global3: WorkerBoundReference<A> = WorkerBoundReference(A(3).freeze())
|
||||
|
||||
@Test
|
||||
@@ -85,7 +81,6 @@ fun testGlobalAccessOnWorkerFrozenInitially() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global4: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -103,7 +98,6 @@ fun testGlobalAccessOnWorkerFrozenBeforePassing() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global5: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -131,7 +125,6 @@ fun testGlobalAccessOnWorkerFrozenBeforeAccess() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global6: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -159,7 +152,6 @@ fun testGlobalModification() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global7: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
|
||||
@@ -19,7 +19,6 @@ var topStringVar = "string"
|
||||
val topSharedStringWithGetter: String
|
||||
get() = "top"
|
||||
val topData = Data(42)
|
||||
@SharedImmutable
|
||||
val topSharedData = Data(43)
|
||||
|
||||
@Test fun runTest1() {
|
||||
@@ -88,7 +87,6 @@ val topSharedData = Data(43)
|
||||
}
|
||||
|
||||
val atomicRef = AtomicReference<Any?>(Any().freeze())
|
||||
@SharedImmutable
|
||||
val stableRef = StableRef.create(Any().freeze())
|
||||
val semaphore = AtomicInt(0)
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ fun initJobs(count: Int) = Array<Job?>(count) { i -> Job(i, i * 2, i)}
|
||||
|
||||
val COUNT = 2
|
||||
|
||||
@SharedImmutable
|
||||
val counters = Array(COUNT) { AtomicInt(0) }
|
||||
|
||||
@Test fun runTest1() {
|
||||
|
||||
Reference in New Issue
Block a user