instance method thread_variable_set

Ruby on Rails 4.0.13

Since v4.0.13 Last seen in v4.2.9

Available in: v4.0.13 v4.1.16 v4.2.9

Signature

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

key req
value req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close