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