Make ThreadLocal and SharedImmutable be actual classes for OptionalExpectations
and move to kotlin.native.concurrent
This commit is contained in:
committed by
Pavel Punegov
parent
c4abd93f53
commit
10b76eacf0
@@ -40,6 +40,16 @@ public annotation class Retain
|
|||||||
@Retention(AnnotationRetention.SOURCE)
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
public annotation class Throws(vararg val exceptionClasses: KClass<out Throwable>)
|
public annotation class Throws(vararg val exceptionClasses: KClass<out Throwable>)
|
||||||
|
|
||||||
|
@Deprecated("ThreadLocal was moved to kotlin.native.concurrent package " +
|
||||||
|
"and became available in Kotlin Common as optional annotation",
|
||||||
|
ReplaceWith("kotlin.native.concurrent.ThreadLocal"))
|
||||||
|
public typealias ThreadLocal = kotlin.native.concurrent.ThreadLocal
|
||||||
|
|
||||||
|
@Deprecated("SharedImmutable was moved to kotlin.native.concurrent package " +
|
||||||
|
"and became available in Kotlin Common as optional annotation",
|
||||||
|
ReplaceWith("kotlin.native.concurrent.SharedImmutable"))
|
||||||
|
public typealias SharedImmutable = kotlin.native.concurrent.SharedImmutable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes top level function available from C/C++ code with the given name.
|
* Makes top level function available from C/C++ code with the given name.
|
||||||
*
|
*
|
||||||
@@ -48,10 +58,4 @@ public annotation class Throws(vararg val exceptionClasses: KClass<out Throwable
|
|||||||
*/
|
*/
|
||||||
@Target(AnnotationTarget.FUNCTION)
|
@Target(AnnotationTarget.FUNCTION)
|
||||||
@Retention(AnnotationRetention.BINARY)
|
@Retention(AnnotationRetention.BINARY)
|
||||||
public annotation class CName(val externName: String = "", val shortName: String = "")
|
public annotation class CName(val externName: String = "", val shortName: String = "")
|
||||||
|
|
||||||
@Deprecated("Please use kotlin.native.concurrent")
|
|
||||||
typealias ThreadLocal = kotlin.native.concurrent.ThreadLocal
|
|
||||||
|
|
||||||
@Deprecated("Please use kotlin.native.concurrent")
|
|
||||||
typealias SharedImmutable = kotlin.native.concurrent.SharedImmutable
|
|
||||||
@@ -9,6 +9,7 @@ package kotlin.native.concurrent
|
|||||||
* Top level variable or object is thread local, and so could be mutable.
|
* Top level variable or object is thread local, and so could be mutable.
|
||||||
* One may use this annotation as the stopgap measure for singleton
|
* One may use this annotation as the stopgap measure for singleton
|
||||||
* object immutability.
|
* object immutability.
|
||||||
|
*
|
||||||
* PLEASE NOTE THAT THIS ANNOTATION MAY GO AWAY IN UPCOMING RELEASES.
|
* PLEASE NOTE THAT THIS ANNOTATION MAY GO AWAY IN UPCOMING RELEASES.
|
||||||
*/
|
*/
|
||||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.CLASS)
|
||||||
@@ -17,8 +18,9 @@ public actual annotation class ThreadLocal
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Top level variable is immutable and so could be shared.
|
* Top level variable is immutable and so could be shared.
|
||||||
|
*
|
||||||
* PLEASE NOTE THAT THIS ANNOTATION MAY GO AWAY IN UPCOMING RELEASES.
|
* PLEASE NOTE THAT THIS ANNOTATION MAY GO AWAY IN UPCOMING RELEASES.
|
||||||
*/
|
*/
|
||||||
@Target(AnnotationTarget.PROPERTY)
|
@Target(AnnotationTarget.PROPERTY)
|
||||||
@Retention(AnnotationRetention.BINARY)
|
@Retention(AnnotationRetention.BINARY)
|
||||||
public actual annotation class SharedImmutable
|
public actual annotation class SharedImmutable
|
||||||
Reference in New Issue
Block a user