summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-11-23 07:20:08 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:44 +0000
commitf4a06aac980f73702a04d2c2f0728c09ebfb7786 (patch)
tree7662625893e3bd83f0719c989c4da05f5c5eebcc /bitbake/lib/bb/cooker.py
parenta519031f2312c02d113635d52cf2e785c9b6f002 (diff)
downloadopenembedded-core-f4a06aac980f73702a04d2c2f0728c09ebfb7786.tar.gz
openembedded-core-f4a06aac980f73702a04d2c2f0728c09ebfb7786.tar.bz2
openembedded-core-f4a06aac980f73702a04d2c2f0728c09ebfb7786.tar.xz
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/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 4b52108ea..69098ccf9 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,