Skip to content

Instantly share code, notes, and snippets.

@film42
Created September 8, 2015 16:28
Show Gist options
  • Save film42/b72608c736a89fbab42e to your computer and use it in GitHub Desktop.
Save film42/b72608c736a89fbab42e to your computer and use it in GitHub Desktop.
Thread.new do
trap(:TRAP) do
::Thread.list.each do |thread|
puts <<-THREAD_TRACE
#{thread.inspect}:
#{thread.backtrace.try(:join, $INPUT_RECORD_SEPARATOR)}"
THREAD_TRACE
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment