module Tins::ThreadLocal

def instance_thread_local(name, default_value = nil, &default)

If the value _value_ is given, it is used to initialize the variable.
Define a thread local variable for the current instance with name _name_.
def instance_thread_local(name, default_value = nil, &default)
  class << self
    extend Tins::ThreadLocal
    self
  end.thread_local name, default_value, &default
  self
end