WorkerBee encapsulates a simple pipeline of threaded workers.
1 2 3 4 5 6 7 8 9 |
bee = WorkerBee.new bee.input enum_of_work_to_do bee.work(20) { |work| ... stuff with input ... } bee.work(5) { |work| ... stuff with results of previous ... } # ... etc ... bee.results # the final set of results |
gem install worker_bee
git clone git://github.com/seattlerb/worker_bee