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



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

Parameters:

Returns:



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