Parent

Methods

Class/Module Index [+]

Quicksearch

Celluloid::StackDump::ActorState

Attributes

backtrace[RW]
cell[RW]
id[RW]
name[RW]
status[RW]
tasks[RW]

Public Instance Methods

dump() click to toggle source
# File lib/celluloid/stack_dump.rb, line 23
def dump
  string = ""
  string << "Celluloid::Actor 0x#{id.to_s(16)}"
  string << " [#{name}]" if name
  string << "\n"

  if cell
    string << cell.dump
    string << "\n"
  end

  if status == :idle
    string << "State: Idle (waiting for messages)\n"
    display_backtrace backtrace, string
  else
    string << "State: Running (executing tasks)\n"
    display_backtrace backtrace, string
    string << "\tTasks:\n"

    tasks.each_with_index do |task, i|
      string << "\t  #{i+1}) #{task.task_class}[#{task.type}]: #{task.status}\n"
      string << "\t      #{task.meta.inspect}\n"
      display_backtrace task.backtrace, string, "\t"
    end
  end

  string
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.