Class: Rake::MultiTask

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

Overview

Same as a regular task, but the immediate prerequisites are done in parallel using Ruby threads.

Instance Attribute Summary

Attributes inherited from Task

#application, #comment, #prerequisites, #scope, #sources

Instance Method Summary collapse

Methods inherited from Task

[], #add_comment, clear, create_rule, define_task, #enhance, #execute, #initialize, #investigation, #invoke, #name, #needed?, scope_name, #source, task_defined?, tasks, #timestamp, #to_s

Constructor Details

This class inherits a constructor from Rake::Task

Instance Method Details

#invoke_prerequisitesObject



556
557
558
559
560
561
# File 'lib/rake.rb', line 556

def invoke_prerequisites
  threads = @prerequisites.collect { |p|
	Thread.new(p) { |r| Task[r].invoke }
  }
  threads.each { |t| t.join }
end