summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-07-23 13:42:54 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:32 +0000
commit0d1034d2ea5913e14317c68908e27640d1d8ae36 (patch)
treeec9598099d58944a9741339a1e2bfe1950d2d780 /bitbake
parent384c5cc8ac5dfd8132887603fc7eb54f2321664b (diff)
downloadopenembedded-core-0d1034d2ea5913e14317c68908e27640d1d8ae36.tar.gz
openembedded-core-0d1034d2ea5913e14317c68908e27640d1d8ae36.tar.bz2
openembedded-core-0d1034d2ea5913e14317c68908e27640d1d8ae36.tar.xz
openembedded-core-0d1034d2ea5913e14317c68908e27640d1d8ae36.zip
Let the RunQueueScheduler control the number of active tasks
(Bitbake rev: 1387423e747f59866fd1cb99a7d90605e668823f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index a1f79e9f0..3a630e02a 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -96,12 +96,13 @@ class RunQueueScheduler(object):
"""
Return the id of the first task we find that is buildable
"""
- for task1 in range(len(self.rqdata.runq_fnid)):
- task = self.prio_map[task1]
- if self.rq.runq_running[task] == 1:
- continue
- if self.rq.runq_buildable[task] == 1:
- return task
+ if self.rq.stats.active < self.rq.number_tasks:
+ for task1 in range(len(self.rqdata.runq_fnid)):
+ task = self.prio_map[task1]
+ if self.rq.runq_running[task] == 1:
+ continue
+ if self.rq.runq_buildable[task] == 1:
+ return task
class RunQueueSchedulerSpeed(RunQueueScheduler):
"""
@@ -1267,10 +1268,7 @@ class RunQueueExecuteTasks(RunQueueExecute):
# nothing to do
self.rq.state = runQueueCleanUp
- task = None
- if self.stats.active < self.number_tasks:
- task = self.sched.next()
- if task is not None:
+ for task in iter(self.sched.next, None):
fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[task]]
taskname = self.rqdata.runq_task[task]
@@ -1306,8 +1304,6 @@ class RunQueueExecuteTasks(RunQueueExecute):
self.build_pipes[pid] = runQueuePipe(pipein, pipeout, self.cfgData)
self.runq_running[task] = 1
self.stats.taskActive()
- if self.stats.active < self.number_tasks:
- return True
for pipe in self.build_pipes:
self.build_pipes[pipe].read()