From: SASADA Koichi Date: 2009-06-09T08:33:42+09:00 Subject: [ruby-core:23762] Re: [Bug #977] caller for all threads patch Hongli Lai wrote:: > SASADA Koichi wrote: >> I made a patch to Thread#caller(lev=1). It may be more flexible than >> fetching "all" backtrace. >> How about it? (not tested enough) > > The ability to see all running threads' backtraces, without needing a > reference to each one of those threads, is caller_for_all_thread's main > advantage. It's very useful for debugging a live application. Replacing > it with Thread#caller would require one to maintain references to all > threads that one wants to inspect. Does Ruby already provide some way to > obtain a list of all running threads? def caller_for_all_thread Thread.list.map{|t| t.caller} end -- // SASADA Koichi at atdot dot net