ThreadLocal class final

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.

Annotations
  • @Target([AnnotationTarget.PROPERTY, AnnotationTarget.CLASS])

Constructors

ThreadLocal()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited