Package co.paralleluniverse.fibers
Class TrueThreadLocal<T>
- java.lang.Object
-
- java.lang.ThreadLocal<T>
-
- co.paralleluniverse.fibers.TrueThreadLocal<T>
-
public class TrueThreadLocal<T> extends java.lang.ThreadLocal<T>
AThreadLocal
that is local to the current thread, rather than Strand. If the current strand is a thread, then this would behave no different than aThreadLocal
, but if it's a fiber, then the value is local to the underlying thread - not the fiber. IMPORTANT: This class is only useful in circumstances where a data structure is striped to reduce contention, not when the value needs to actually be associated with the thread in any way.
-
-
Constructor Summary
Constructors Constructor Description TrueThreadLocal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
void
set(T value)
-