Method: Celluloid::ClassMethods#pool

Defined in:
lib/celluloid/supervision/container/behavior/pool.rb

#pool(config = {}, &block) ⇒ Object

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



12
13
14
15
# 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