instance method
thread_variable_set
Ruby on Rails 4.1.16
Since v4.0.13 Last seen in v4.2.9Signature
thread_variable_set(key, value)
Sets a thread local with key to value. Note that these are local to threads, and not to fibers. Please see Thread#thread_variable_get for more information.
Parameters
-
keyreq -
valuereq
Source
# File activesupport/lib/active_support/core_ext/thread.rb, line 32
def thread_variable_set(key, value)
_locals[key.to_sym] = value
end
Defined in activesupport/lib/active_support/core_ext/thread.rb line 32
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Thread