mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
bitbake: runqueue: Tweak buildable variable handling in scheduler
Work off a copy of the 'buildable' class variable, allowing easier future code changes. (Bitbake rev: e851169acfebba404514135bf512e6f045739a13) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -142,7 +142,8 @@ class RunQueueScheduler(object):
|
|||||||
Return the id of the first task we find that is buildable
|
Return the id of the first task we find that is buildable
|
||||||
"""
|
"""
|
||||||
self.buildable = [x for x in self.buildable if x not in self.rq.runq_running]
|
self.buildable = [x for x in self.buildable if x not in self.rq.runq_running]
|
||||||
if not self.buildable:
|
buildable = self.buildable
|
||||||
|
if not buildable:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Filter out tasks that have a max number of threads that have been exceeded
|
# Filter out tasks that have a max number of threads that have been exceeded
|
||||||
@@ -158,8 +159,8 @@ class RunQueueScheduler(object):
|
|||||||
else:
|
else:
|
||||||
skip_buildable[rtaskname] = 1
|
skip_buildable[rtaskname] = 1
|
||||||
|
|
||||||
if len(self.buildable) == 1:
|
if len(buildable) == 1:
|
||||||
tid = self.buildable[0]
|
tid = buildable[0]
|
||||||
taskname = taskname_from_tid(tid)
|
taskname = taskname_from_tid(tid)
|
||||||
if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]):
|
if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]):
|
||||||
return None
|
return None
|
||||||
@@ -174,7 +175,7 @@ class RunQueueScheduler(object):
|
|||||||
|
|
||||||
best = None
|
best = None
|
||||||
bestprio = None
|
bestprio = None
|
||||||
for tid in self.buildable:
|
for tid in buildable:
|
||||||
taskname = taskname_from_tid(tid)
|
taskname = taskname_from_tid(tid)
|
||||||
if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]):
|
if taskname in skip_buildable and skip_buildable[taskname] >= int(self.skip_maxthread[taskname]):
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user