Cross-platform equivalent for java.lang.ThreadLocal
,
for specifying thread-local variables.
These variables differ from their normal counterparts in that each thread that accesses one (via its ThreadLocal#get or ThreadLocal#set method) has its own, independently initialized copy of the variable.
class Object
trait Matchable
class Any
Value members
Concrete methods
Returns the value in the current thread's copy of this thread-local variable. If the variable has no value for the current thread, it is initialized with the initial value specified in the constructor.
Returns the value in the current thread's copy of this thread-local variable. If the variable has no value for the current thread, it is initialized with the initial value specified in the constructor.
- Returns:
the current thread's value of this thread-local