class Thread

def thread_variable_set(key, value)

more information.
threads, and not to fibers. Please see Thread#thread_variable_get for
Sets a thread local with +key+ to +value+. Note that these are local to
def thread_variable_set(key, value)
  _locals[key.to_sym] = value
end