summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-07-06 17:45:18 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-16 12:31:20 +0100
commit6598f98ba8fc2d058a1a5d948b48f81a2b052776 (patch)
tree40a66ba45550449c46086422ea6c172061da1c67 /bitbake
parent8c238504536c9af824557622a1e284ebf0b884a5 (diff)
downloadpoky-6598f98ba8fc2d058a1a5d948b48f81a2b052776.tar.gz
bitbake: runqueue: Allow passing of success/failure handlers to runqueue_process_waitpid()
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 31978d49ba..f9acd9ca2d 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -956,7 +956,7 @@ class RunQueue:
956 self.build_pipes[pipe].read() 956 self.build_pipes[pipe].read()
957 957
958 if self.stats.active > 0: 958 if self.stats.active > 0:
959 if self.runqueue_process_waitpid() is None: 959 if self.runqueue_process_waitpid(self.task_complete, self.task_fail) is None:
960 return 960 return
961 continue 961 continue
962 962
@@ -975,7 +975,7 @@ class RunQueue:
975 self.state = runQueueComplete 975 self.state = runQueueComplete
976 return 976 return
977 977
978 def runqueue_process_waitpid(self): 978 def runqueue_process_waitpid(self, success, failure):
979 """ 979 """
980 Return none is there are no processes awaiting result collection, otherwise 980 Return none is there are no processes awaiting result collection, otherwise
981 collect the process exit codes and close the information pipe. 981 collect the process exit codes and close the information pipe.
@@ -988,9 +988,9 @@ class RunQueue:
988 self.build_pipes[result[0]].close() 988 self.build_pipes[result[0]].close()
989 del self.build_pipes[result[0]] 989 del self.build_pipes[result[0]]
990 if result[1] != 0: 990 if result[1] != 0:
991 self.task_fail(task, result[1]) 991 failure(task, result[1])
992 else: 992 else:
993 self.task_complete(task) 993 success(task)
994 self.stats.taskCompleted() 994 self.stats.taskCompleted()
995 bb.event.fire(runQueueTaskCompleted(task, self.stats, self), self.cfgData) 995 bb.event.fire(runQueueTaskCompleted(task, self.stats, self), self.cfgData)
996 996
@@ -1016,7 +1016,7 @@ class RunQueue:
1016 try: 1016 try:
1017 while self.stats.active > 0: 1017 while self.stats.active > 0:
1018 bb.event.fire(runQueueExitWait(self.stats.active), self.cfgData) 1018 bb.event.fire(runQueueExitWait(self.stats.active), self.cfgData)
1019 if self.runqueue_process_waitpid() is None: 1019 if self.runqueue_process_waitpid(self.task_complete, self.task_fail) is None:
1020 return 1020 return
1021 except: 1021 except:
1022 self.finish_runqueue_now() 1022 self.finish_runqueue_now()