summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 3a630e02a2..be873ff7dc 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -92,17 +92,23 @@ class RunQueueScheduler(object):
92 self.prio_map = [] 92 self.prio_map = []
93 self.prio_map.extend(range(numTasks)) 93 self.prio_map.extend(range(numTasks))
94 94
95 def next(self): 95 def next_buildable_tasks(self):
96 """ 96 """
97 Return the id of the first task we find that is buildable 97 Return the id of the first task we find that is buildable
98 """ 98 """
99 for tasknum in range(len(self.rqdata.runq_fnid)):
100 taskid = self.prio_map[tasknum]
101 if self.rq.runq_running[taskid] == 1:
102 continue
103 if self.rq.runq_buildable[taskid] == 1:
104 yield taskid
105
106 def next(self):
107 """
108 Return the id of the task we should build next
109 """
99 if self.rq.stats.active < self.rq.number_tasks: 110 if self.rq.stats.active < self.rq.number_tasks:
100 for task1 in range(len(self.rqdata.runq_fnid)): 111 return next(self.next_buildable_tasks(), None)
101 task = self.prio_map[task1]
102 if self.rq.runq_running[task] == 1:
103 continue
104 if self.rq.runq_buildable[task] == 1:
105 return task
106 112
107class RunQueueSchedulerSpeed(RunQueueScheduler): 113class RunQueueSchedulerSpeed(RunQueueScheduler):
108 """ 114 """