Move the flushing of old work into restart threads so it's done before any worker threads grab more work.