Module: Kernel

Defined in:
lib/common/thread_formatter.rb

Instance Method Summary collapse

Instance Method Details

#with_thread_name(name) ⇒ Object



46
47
48
49
50
51
52
# File 'lib/common/thread_formatter.rb', line 46

def with_thread_name(name)
  old_name = Thread.current[:name]
  Thread.current[:name] = name
  yield
ensure
  Thread.current[:name] = old_name
end