Package io.perfmark.impl
Class ConcurrentThreadLocal<T>
java.lang.Object
io.perfmark.impl.ConcurrentThreadLocal<T>
A "thread local" variable that uses weak refs to track the thread to value mapping.
This class is useful when
ThreadLocal instances are inconvenient.
Like All classes in this package, this class is not API stable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReferenceQueue<Thread> private final ConcurrentMap<ThreadRef, T> -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
refs
-
queue
-
-
Constructor Details
-
ConcurrentThreadLocal
public ConcurrentThreadLocal()
-
-
Method Details
-
get
-
remove
public void remove() -
set
-
initialValue
-
initialValueInternal
-
drainQueue
private void drainQueue() -
drainQueue
-