Method: Zold::ThreadPool#to_s

Defined in:
lib/zold/thread_pool.rb

#to_sObject

As a text



144
145
146
147
148
149
150
151
152
# File 'lib/zold/thread_pool.rb', line 144

def to_s
  @threads.map do |t|
    [
      "#{t.name}: status=#{t.status}; alive=#{t.alive?}",
      'Vars: ' + t.thread_variables.map { |v| "#{v}=\"#{t.thread_variable_get(v)}\"" }.join('; '),
      t.backtrace.nil? ? 'NO BACKTRACE' : "  #{t.backtrace.join("\n  ")}"
    ].join("\n")
  end
end