def stop(self, wait=True): if self.worker: self.worker.should_stop.set() AbstractBuildRunner.stop(self, wait=wait)