<<the best code in life>> appeared to be crap. Fixed now, added ad hoc implementation of CountBothWaysLatch, (by synchronizing on atomic integer), which should do the trick of waiting for all the jobs to finish. If that's the best way, I don't know...