Top Description Fields Constructors Methods
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 TypeField and Description
private final Thread
private final T

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public T
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

threadback to summary
private final Thread thread
valueback to summary
private final T value

Constructor Detail

SingleThreadValueback to summary
pack-priv SingleThreadValue(T value)

Method Detail

getValueback to summary
public T getValue()
hasValueback to summary
public boolean hasValue()