Class: Celluloid::Internals::Stack::ActorState

### Home Classes Methods

### In Files

- lib/celluloid/internals/stack/states.rb

### Parent

Object

### Methods

- #dump

### Included Modules

- Celluloid::Internals::Stack::DisplayBacktrace

### Class/Module Index

Quicksearch

- Celluloid
- Celluloid::Incident
- Celluloid::IncidentLogger
- Celluloid::IncidentLogger::Severity
- Celluloid::IncidentReporter
- Celluloid::IncidentReporter::Formatter
- Celluloid::Internals
- Celluloid::Internals::CPUCounter
- Celluloid::Internals::CallChain
- Celluloid::Internals::Handler
- Celluloid::Internals::Handlers
- Celluloid::Internals::Links
- Celluloid::Internals::Logger
- Celluloid::Internals::Logger::WithBacktrace
- Celluloid::Internals::Method
- Celluloid::Internals::Properties
- Celluloid::Internals::Receiver
- Celluloid::Internals::Receivers
- Celluloid::Internals::Registry
- Celluloid::Internals::Response
- Celluloid::Internals::Response::Block
- Celluloid::Internals::Response::Error
- Celluloid::Internals::Response::Success
- Celluloid::Internals::Signals
- Celluloid::Internals::Stack
- Celluloid::Internals::Stack::ActorState
- Celluloid::Internals::Stack::CellState
- Celluloid::Internals::Stack::DisplayBacktrace
- Celluloid::Internals::Stack::Dump
- Celluloid::Internals::Stack::Summary
- Celluloid::Internals::Stack::TaskState
- Celluloid::Internals::Stack::ThreadState
- Celluloid::Internals::TaskSet
- Celluloid::Internals::ThreadHandle
- Celluloid::Internals::UUID
- Celluloid::LogEvent
- Celluloid::Notifications
- Celluloid::Notifications::Fanout
- Celluloid::Notifications::Subscriber
- Celluloid::Probe
- Celluloid::RingBuffer

No matching classes.

# Celluloid::Internals::Stack::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/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.meta.inspect}\n"
            display_backtrace task.backtrace, string, "\t"
          end
        end
      end
      string << "\n" unless backtrace
      string
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.