Class: DepthFirst::ParallelOrganizer

Inherits:
Task
  • Object
show all
Defined in:
lib/depth_first/parallel_organizer.rb

Overview

Base parallel organizer class

Constant Summary collapse

TASKS =
[].freeze

Instance Attribute Summary

Attributes inherited from Task

#options

Instance Method Summary collapse

Methods inherited from Task

#initialize

Constructor Details

This class inherits a constructor from DepthFirst::Task

Instance Method Details

#performObject



6
7
8
9
# File 'lib/depth_first/parallel_organizer.rb', line 6

def perform
  tasks.map { |task| execute_promise(task) }
       .reduce(options) { |a, e| resolve_promise(a, e) }
end