Files
ubicloud/lib/thread_printer.rb
Daniel Farina d61aa8a15c Move Thread dump code ThreadPrinter module
Printing thread stack traces is useful when diagnosing issues with
slow or non-termination, and we might have one of those issues on the
web site.  So, refactor the thread dumping code for reuse.
2023-09-04 13:01:21 -07:00

11 lines
197 B
Ruby

# frozen_string_literal: true
module ThreadPrinter
def self.run
Thread.list.each do |thread|
puts "Thread: #{thread.inspect}"
puts thread.backtrace&.join("\n")
end
end
end