Class: Celluloid::Internals::Stack::ActorState
- Inherits:
-
Object
- Object
- Celluloid::Internals::Stack::ActorState
- Includes:
- DisplayBacktrace
- Defined in:
- lib/celluloid/internals/stack/states.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
Returns the value of attribute backtrace.
-
#cell ⇒ Object
Returns the value of attribute cell.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
Instance Method Summary collapse
Methods included from DisplayBacktrace
Instance Attribute Details
#backtrace ⇒ Object
Returns the value of attribute backtrace.
37 38 39 |
# File 'lib/celluloid/internals/stack/states.rb', line 37 def backtrace @backtrace end |
#cell ⇒ Object
Returns the value of attribute cell.
35 36 37 |
# File 'lib/celluloid/internals/stack/states.rb', line 35 def cell @cell end |
#id ⇒ Object
Returns the value of attribute id.
35 36 37 |
# File 'lib/celluloid/internals/stack/states.rb', line 35 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
35 36 37 |
# File 'lib/celluloid/internals/stack/states.rb', line 35 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
36 37 38 |
# File 'lib/celluloid/internals/stack/states.rb', line 36 def status @status end |
#tasks ⇒ Object
Returns the value of attribute tasks.
36 37 38 |
# File 'lib/celluloid/internals/stack/states.rb', line 36 def tasks @tasks end |
Instance Method Details
#dump ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/celluloid/internals/stack/states.rb', line 39 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 if backtrace else string << "State: Running (executing tasks)\n" display_backtrace backtrace, string if backtrace string << "\tTasks:\n" tasks.each_with_index do |task, i| string << "\t #{i + 1}) #{task.task_class}[#{task.type}]: #{task.status}\n" if task.backtrace string << "\t #{task..inspect}\n" display_backtrace task.backtrace, string, "\t" end end end string << "\n" unless backtrace string end |