Class: Mutant::Parallel::Master
- Inherits:
-
Object
- Object
- Mutant::Parallel::Master
- Defined in:
- lib/mutant/parallel/master.rb
Overview
Master parallel worker
Class Method Summary collapse
-
.call(config) ⇒ Actor::Sender
private
Run master.
Instance Method Summary collapse
-
#initialize ⇒ undefined
constructor
private
Initialize object.
Constructor Details
#initialize ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize object
27 28 29 30 31 32 33 34 |
# File 'lib/mutant/parallel/master.rb', line 27 def initialize(*) super @stop = false @workers = 0 @active_jobs = Set.new @index = 0 end |
Class Method Details
.call(config) ⇒ Actor::Sender
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run master
16 17 18 19 20 |
# File 'lib/mutant/parallel/master.rb', line 16 def self.call(config) config.env.spawn do |mailbox| new(config, mailbox).__send__(:run) end end |