Class: Mutant::Parallel::Worker Private

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/mutant/parallel/worker.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Parallel execution worker

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(attributes) ⇒ self

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 worker



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

def self.run(attributes)
  new(attributes).run
  self
end

Instance Method Details

#runself

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.

Worker loop

rubocop:disable Lint/Loop



30
31
32
33
34
# File 'lib/mutant/parallel/worker.rb', line 30

def run
  begin
    parent.call(Actor::Message.new(:ready, mailbox.sender))
  end until handle(mailbox.receiver.call)
end