Graceful shutdown - wait for workers to complete