diff options
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 9acad7af8e..3bcbaee12a 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -133,7 +133,7 @@ class RunQueueScheduler(object): | |||
133 | 133 | ||
134 | self.prio_map = [self.rqdata.runtaskentries.keys()] | 134 | self.prio_map = [self.rqdata.runtaskentries.keys()] |
135 | 135 | ||
136 | self.buildable = [] | 136 | self.buildable = set() |
137 | self.skip_maxthread = {} | 137 | self.skip_maxthread = {} |
138 | self.stamps = {} | 138 | self.stamps = {} |
139 | for tid in self.rqdata.runtaskentries: | 139 | for tid in self.rqdata.runtaskentries: |
@@ -148,8 +148,10 @@ class RunQueueScheduler(object): | |||
148 | """ | 148 | """ |
149 | Return the id of the first task we find that is buildable | 149 | Return the id of the first task we find that is buildable |
150 | """ | 150 | """ |
151 | self.buildable = [x for x in self.buildable if x not in self.rq.runq_running] | 151 | buildable = set(self.buildable) |
152 | buildable = [x for x in self.buildable if (x in self.rq.tasks_covered or x in self.rq.tasks_notcovered) and x not in self.rq.holdoff_tasks] | 152 | buildable.difference_update(self.rq.runq_running) |
153 | buildable.difference_update(self.rq.holdoff_tasks) | ||
154 | buildable.intersection_update(self.rq.tasks_covered | self.rq.tasks_notcovered) | ||
153 | if not buildable: | 155 | if not buildable: |
154 | return None | 156 | return None |
155 | 157 | ||
@@ -167,7 +169,7 @@ class RunQueueScheduler(object): | |||
167 | skip_buildable[rtaskname] = 1 | 169 | skip_buildable[rtaskname] = 1 |
168 | 170 | ||
169 | if len(buildable) == 1: | 171 | if len(buildable) == 1: |
170 | tid = buildable[0] | 172 | tid = buildable.pop() |
171 | taskname = taskname_from_tid(tid) | 173 | taskname = taskname_from_tid(tid) |
172 | if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]): | 174 | if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]): |
173 | return None | 175 | return None |
@@ -204,7 +206,7 @@ class RunQueueScheduler(object): | |||
204 | return self.next_buildable_task() | 206 | return self.next_buildable_task() |
205 | 207 | ||
206 | def newbuildable(self, task): | 208 | def newbuildable(self, task): |
207 | self.buildable.append(task) | 209 | self.buildable.add(task) |
208 | 210 | ||
209 | def removebuildable(self, task): | 211 | def removebuildable(self, task): |
210 | self.buildable.remove(task) | 212 | self.buildable.remove(task) |