kotlin.reflect.jvm.internal.impl.storage
pack-priv Class SingleThreadValue<T>
extends Object
- Class Inheritance
-
A storage for the value that should exist and be accessible in the single thread.
Unlike ThreadLocal, thread doesn't store a reference to the value that makes it inaccessible globally, but simplifies memory
management.
The other difference from ThreadLocal is inability to have different values per each thread, so SingleThreadValue instance
should be protected with external lock from rewrites.
Field Summary
| Modifier and Type | Field and Description
|
|---|
| private final Thread |
|
| private final T |
|
Constructor Summary
| Access | Constructor and Description
|
|---|
| pack-priv |
|