module Celluloid::ClassMethods
Public Instance Methods
pool(config={}, &block)
click to toggle source
Create a new pool of workers. Accepts the following options:
-
size: how many workers to create. Default is worker per CPU core
-
args: array of arguments to pass when creating a worker
# File lib/celluloid/supervision/container/behavior/pool.rb, line 12 def pool(config={}, &block) _ = Celluloid.supervise(pooling_options(config, block: block, actors: self)) _.actors.last end
pool_link(klass, config={}, &block)
click to toggle source
Same as pool, but links to the pool manager
# File lib/celluloid/supervision/container/behavior/pool.rb, line 18 def pool_link(klass, config={}, &block) Supervision::Container::Pool.new_link(pooling_options(config, block: block, actors: klass)) end