Mark all Worker-related API as obsolete.
* Explain what obsolete means and why workers are obsolete * Add some documentation to workers to explain its common pitfalls ^KT-54702 Merge-request: KT-MR-9563 Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
This commit is contained in:
committed by
Space Team
parent
ec4fab57a7
commit
af9252aa96
@@ -2,7 +2,7 @@
|
||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
@file:OptIn(ExperimentalStdlibApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
@file:OptIn(ExperimentalStdlibApi::class, kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
||||
|
||||
package runtime.basic.cleaner_workers
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
@file:OptIn(ObsoleteWorkersApi::class)
|
||||
package runtime.basic.initializers6
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* that can be found in the LICENSE file.
|
||||
*/
|
||||
|
||||
@file:OptIn(ObsoleteWorkersApi::class)
|
||||
package runtime.basic.worker_random
|
||||
|
||||
import kotlin.native.concurrent.*
|
||||
@@ -39,4 +40,4 @@ fun testRandomWorkers() {
|
||||
workers.forEach {
|
||||
it.requestTermination().result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user