Class: Mutant::Parallel::Master

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/parallel/master.rb

Overview

Master parallel worker

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeundefined

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



29
30
31
32
33
34
35
36
# File 'lib/mutant/parallel/master.rb', line 29

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 runner component



17
18
19
20
21
# File 'lib/mutant/parallel/master.rb', line 17

def self.call(config)
  config.env.spawn do |actor|
    new(config, actor).__send__(:run)
  end
end