mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 18:07:12 +01:00
Update parallel_debug
This commit is contained in:
parent
b59a04a086
commit
bf45d33f9e
@ -207,22 +207,16 @@ def map_to_color(name):
|
|||||||
return color2code['RED']
|
return color2code['RED']
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
m = self.master
|
m = self.generator.bld.producer
|
||||||
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
|
|
||||||
try:
|
try:
|
||||||
|
# TODO another place for this?
|
||||||
del self.generator.bld.task_sigs[self.uid()]
|
del self.generator.bld.task_sigs[self.uid()]
|
||||||
except:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
self.generator.bld.producer.set_running(1, id(Utils.threading.currentThread()), self)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.log_display(self.generator.bld)
|
|
||||||
ret = self.run()
|
ret = self.run()
|
||||||
except Exception:
|
except Exception:
|
||||||
self.err_msg = Utils.ex_stack()
|
self.err_msg = Utils.ex_stack()
|
||||||
@ -230,12 +224,11 @@ def process(self):
|
|||||||
|
|
||||||
# TODO cleanup
|
# TODO cleanup
|
||||||
m.error_handler(self)
|
m.error_handler(self)
|
||||||
m.out.put(self)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if ret:
|
if ret:
|
||||||
self.err_code = ret
|
self.err_code = ret
|
||||||
self.hasrun = Task.CRASHED
|
self.hasrun = CRASHED
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
self.post_run()
|
self.post_run()
|
||||||
@ -249,8 +242,8 @@ def process(self):
|
|||||||
if self.hasrun != Task.SUCCESS:
|
if self.hasrun != Task.SUCCESS:
|
||||||
m.error_handler(self)
|
m.error_handler(self)
|
||||||
|
|
||||||
self.master.set_running(-1, id(Utils.threading.currentThread()), self)
|
self.generator.bld.producer.set_running(-1, id(Utils.threading.currentThread()), self)
|
||||||
m.out.put(self)
|
|
||||||
Task.TaskBase.process_back = Task.TaskBase.process
|
Task.TaskBase.process_back = Task.TaskBase.process
|
||||||
Task.TaskBase.process = process
|
Task.TaskBase.process = process
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user