From: quixoticsycophant@... Date: 2008-09-09T19:03:43+09:00 Subject: Re: Drake: Distributed Rake On Sep 9, 4:52 am, David Masover wrote: > > So what do you do with things which aren't thread-save? Or "j-safe"? > The same thing you do with a Makefile that isn't j-safe: (1) write the dependencies correctly, which makes it j-safe, or (2) don't run it with -j. > And how is this different than running Rake with 'task' set to an alias > of 'multitask'? If 'task' became 'multitask', Rake would run all your tasks at once -- all at the same time. That's probably not what you want :) Thinking in terms of parallel execution has a little learning curve. It's certainly a not a natural transition coming from single-threaded thinking. Incidentally there is a good litmus test for determining whether you get the gist of parallelism: once it becomes obvious that 'multitask' is a mistake, then you probably get it. The dependency graph tells us what can be run in parallel and what can't. It's a math problem. 'multitask' stomps it all to pieces, having the power to declare 2 + 5 = 8 if it so chooses. My advice for Rakefile writers is to incrementally move toward -j correctness. Start with the bottom tasks first (those executed last) and work your way up, testing each new task subtree. Regards, J