module DSLKit::ThreadLocal

def instance_thread_local(name, value = nil)

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, value = nil)
  sc = class << self
    extend DSLKit::ThreadLocal
    self
  end
  sc.thread_local name, value
  self
end