class Concurrent::ThreadLocalVar

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