class Rake::ThreadPool
def join
def join @threads_mon.synchronize do begin @join_cond.wait unless @threads.empty? rescue Exception => e $stderr.puts e $stderr.print "Queue contains #{@queue.size} items. Thread pool contains #{@threads.count} threads\n" $stderr.print "Current Thread #{Thread.current} status = #{Thread.current.status}\n" $stderr.puts e.backtrace.join("\n") @threads.each do |t| $stderr.print "Thread #{t} status = #{t.status}\n" $stderr.puts t.backtrace.join("\n") if t.respond_to? :backtrace end raise e end end end