Neat little trick for any rakefiles you might have lying around:
class Task
def invoke
if $trace
puts "** Invoke #{name} #{format_trace_flags}"
end
return if @already_invoked
@already_invoked = true
threads = @prerequisites.collect{|p|
Thread.new(p){|r| Task[r].invoke} }
threads.each{|t| t.join}
execute if needed?
end
end
This assumes that the order of prerequisites for a given task is
unimportant. Really nice if you''ve got a lot of IO-bound tasks. Like,
say, subversion exports, or database dumps.
Hardly groundbreaking, I know, but I like it :-)
--
Alex