ThreadLocal

Common
Native
1.0
@Target([AnnotationTarget.PROPERTY, AnnotationTarget.CLASS]) annotation class ThreadLocal
(Common source) (Native source)

Marks a top level property with a backing field or an object as thread local. The object remains mutable and it is possible to change its state, but every thread will have a distinct copy of this object, so changes in one thread are not reflected in another.

The annotation has effect only in Kotlin/Native platform.

PLEASE NOTE THAT THIS ANNOTATION MAY GO AWAY IN UPCOMING RELEASES.

Constructors

Common
Native
1.0

<init>

Marks a top level property with a backing field or an object as thread local. The object remains mutable and it is possible to change its state, but every thread will have a distinct copy of this object, so changes in one thread are not reflected in another.

<init>()