[Rake-devel] JobTask

Ittay Dror ittay.dror at gmail.com
Mon Aug 11 03:48:08 EDT 2008


I want to post a mixin that can be used to turn any task into one that 
runs its prerequisites in threads. The difference with MultiTask is that 
MultiTask creates a separate thread per prerequisites which causes 
thrashing if there are many (esp. for tasks that do IO, like compile tasks).

There are two files. The first is thread_pool.rb which provides a 
general thread pool implementation. I've tried several implementations 
and this is the only one that worked reliably for me. The second is the 
mixin. (actually, in the patch the order is reversed)

The patch is attached.


Ittay Dror <ittay.dror at gmail.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jobtask.patch
Type: text/x-diff
Size: 3389 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/rake-devel/attachments/20080811/6e3f06f3/attachment.bin>

More information about the Rake-devel mailing list