Sha256: 697c2ebf9ae2aa1ac54870b3ce3d4f30aa44a39d098c103d8d25a9f5889978b0
Contents?: true
Size: 469 Bytes
Versions: 3
Compression:
Stored size: 469 Bytes
Contents
require 'pp' if Thread.current.respond_to? :backtrace fella = proc { out = {} Thread.list.each{|t| out[t] = t.backtrace } out } elsif respond_to? :caller_for_all_threads fella = proc { caller_for_all_threads } else raise 'appears no caller for all threads or Thread#backtrace in your current system' end time = $ping_interval || 5 # seconds Thread.new { loop { sleep time pp fella.call } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
backtracer-0.2.4 | lib/backtracer_ping.rb |
backtracer-0.2.3 | lib/backtracer_ping.rb |
backtracer-0.2.2 | lib/backtracer_ping.rb |