Module: Kernel

Defined in:
lib/common/thread_formatter.rb

Instance Method Summary collapse

Instance Method Details

#with_thread_name(name) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/common/thread_formatter.rb', line 43

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