From bf45d33f9efe8dc75f39e4b8c85efa14a5d7cf2c Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 28 Apr 2016 20:14:02 +0200 Subject: [PATCH] Update parallel_debug --- waflib/extras/parallel_debug.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/waflib/extras/parallel_debug.py b/waflib/extras/parallel_debug.py index 621919c1..952351dc 100644 --- a/waflib/extras/parallel_debug.py +++ b/waflib/extras/parallel_debug.py @@ -207,22 +207,16 @@ def map_to_color(name): return color2code['RED'] def process(self): - m = self.master - if m.stop: - m.out.put(self) - return - - self.master.set_running(1, id(Utils.threading.currentThread()), self) - - # remove the task signature immediately before it is executed - # in case of failure the task will be executed again + m = self.generator.bld.producer try: + # TODO another place for this? del self.generator.bld.task_sigs[self.uid()] - except: + except KeyError: pass + self.generator.bld.producer.set_running(1, id(Utils.threading.currentThread()), self) + try: - self.log_display(self.generator.bld) ret = self.run() except Exception: self.err_msg = Utils.ex_stack() @@ -230,12 +224,11 @@ def process(self): # TODO cleanup m.error_handler(self) - m.out.put(self) return if ret: self.err_code = ret - self.hasrun = Task.CRASHED + self.hasrun = CRASHED else: try: self.post_run() @@ -249,8 +242,8 @@ def process(self): if self.hasrun != Task.SUCCESS: m.error_handler(self) - self.master.set_running(-1, id(Utils.threading.currentThread()), self) - m.out.put(self) + self.generator.bld.producer.set_running(-1, id(Utils.threading.currentThread()), self) + Task.TaskBase.process_back = Task.TaskBase.process Task.TaskBase.process = process