thread_variable_get(key)
Instance Public methods
Returns the value of a thread local variable that has been set. Note that
these are different than fiber local values.
Thread local values are carried along with
threads, and do not respect fibers. For example:
Thread.new {
Thread.current.thread_variable_set("foo", "bar") # set a thread local
Thread.current["foo"] = "bar" # set a fiber local
Fiber.new {
Fiber.yield [
Thread.current.thread_variable_