make StopWorkers deterministic by waiting for the workers to stop