Method: Tins::ThreadLocal#instance_thread_local
- Defined in:
- lib/tins/thread_local.rb
#instance_thread_local(name, value = nil) ⇒ Object
Define a thread local variable for the current instance with name name. If the value value is given, it is used to initialize the variable.
43 44 45 46 47 48 49 |
# File 'lib/tins/thread_local.rb', line 43 def instance_thread_local(name, value = nil) class << self extend Tins::ThreadLocal self end.thread_local name, value self end |