Hello,
I have an eventually finite amount of tasks which need to be processed. My code goes like this:
pool = ActionPool::Pool.new
tasks.each do |t|
pool.queue Proc.new {
...
}
end
while pool.working >0
sleep 1
end
pool.shutdown
I see this as a bit of hack, surely something like that should be part of the pool code. For example:
class Pool
def wait_finish(pollint=1)
while self.working >0
sleep pollint
end
end