diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-11-23 07:20:08 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:44 +0000 |
commit | f4a06aac980f73702a04d2c2f0728c09ebfb7786 (patch) | |
tree | 7662625893e3bd83f0719c989c4da05f5c5eebcc /bitbake | |
parent | a519031f2312c02d113635d52cf2e785c9b6f002 (diff) | |
download | openembedded-core-f4a06aac980f73702a04d2c2f0728c09ebfb7786.tar.gz openembedded-core-f4a06aac980f73702a04d2c2f0728c09ebfb7786.tar.bz2 openembedded-core-f4a06aac980f73702a04d2c2f0728c09ebfb7786.zip |
cooker: get number of threads in constructor
(Bitbake rev: e7fd259d1528f48b0812fb7b0a54dd6d5d22f4a9)
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/cooker.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 4b52108eaf..69098ccf91 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -998,6 +998,8 @@ class CookerParser(object): self.result_queue = None self.fromcache = None self.progress_chunk = self.total / 100 + self.num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or + multiprocessing.cpu_count()) def launch_processes(self): self.task_queue = multiprocessing.Queue() @@ -1018,9 +1020,7 @@ class CookerParser(object): output.put(infos) self.processes = [] - num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or - multiprocessing.cpu_count()) - for i in xrange(num_processes): + for i in xrange(self.num_processes): process = multiprocessing.Process(target=worker, args=(self.task_queue, self.result_queue, |