class Concurrent::ThreadLocalVar
@!macro thread_local_var
A `ThreadLocalVar` is a variable where the value is different for each thread. Each variable may have a default value, but when you modify the variable only the current thread will ever see that change. @!macro thread_safe_variable_comparison @example v = ThreadLocalVar.new(14) v.value #=> 14 v.value = 2 v.value #=> 2 @example v = ThreadLocalVar.new(14) t1 = Thread.new do v.value #=> 14 v.value = 1 v.value #=> 1 end t2 = Thread.new do v.value #=> 14 v.value = 2 v.value #=> 2 end v.value #=> 14 @see https://docs.oracle.com/javase/7/docs/api/java/lang/ThreadLocal.html Java ThreadLocal
@!macro thread_local_var_public_api