Class: Celluloid::Supervisor

Inherits:
Object
  • Object
show all
Defined in:
lib/celluloid/supervisor.rb

Overview

Supervisors are actors that watch over other actors and restart them if they crash

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.rootObject

Define the root of the supervision tree


7
8
9
# File 'lib/celluloid/supervisor.rb', line 7

def root
  @root
end

Class Method Details

.supervise(klass, *args, &block) ⇒ Object


9
10
11
12
13
# File 'lib/celluloid/supervisor.rb', line 9

def supervise(klass, *args, &block)
  SupervisionGroup.new do |group|
    group.supervise klass, *args, &block
  end
end

.supervise_as(name, klass, *args, &block) ⇒ Object


15
16
17
18
19
# File 'lib/celluloid/supervisor.rb', line 15

def supervise_as(name, klass, *args, &block)
  SupervisionGroup.new do |group|
    group.supervise_as name, klass, *args, &block
  end
end