diff --git a/waflib/Runner.py b/waflib/Runner.py index 01c3df1e..4ad1975b 100644 --- a/waflib/Runner.py +++ b/waflib/Runner.py @@ -29,12 +29,13 @@ class Consumer(Utils.threading.Thread): self.start() def run(self): try: - self.task.process() + if not self.spawner.master.stop: + self.task.process() finally: + self.spawner.sem.release() self.spawner.master.out.put(self.task) - self.spawner.sem.release() - self.task = None - self.spawner = None + self.task = None + self.spawner = None class Spawner(Utils.threading.Thread): def __init__(self, master): diff --git a/waflib/Task.py b/waflib/Task.py index 8eb67772..ff79e5b7 100644 --- a/waflib/Task.py +++ b/waflib/Task.py @@ -200,14 +200,10 @@ class TaskBase(evil): Assume that the task has had a ``master`` which is an instance of :py:class:`waflib.Runner.Parallel`. Execute the task and then put it back in the queue :py:attr:`waflib.Runner.Parallel.out` (may be replaced by subclassing). """ - m = self.generator.bld.producer - if m.stop: - return - # remove the task signature immediately before it is executed # in case of failure the task will be executed again try: - # TODO waf 1.9 - this breaks encapsulation + # TODO another place for this? del self.generator.bld.task_sigs[self.uid()] except KeyError: pass