Module: Celluloid::Worker::ClassMethods

Defined in:
lib/celluloid/worker.rb

Overview

Class methods added to classes which include Celluloid::Worker

Instance Method Summary collapse

Instance Method Details

#pool(options = {}) ⇒ 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



16
17
18
# File 'lib/celluloid/worker.rb', line 16

def pool(options = {})
  Manager.new(self, options)
end