summaryrefslogtreecommitdiffstats
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)
downloadpoky-f4a06aac980f73702a04d2c2f0728c09ebfb7786.tar.gz
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 4b52108eaf..69098ccf91 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -998,6 +998,8 @@ class CookerParser(object):
998 self.result_queue = None 998 self.result_queue = None
999 self.fromcache = None 999 self.fromcache = None
1000 self.progress_chunk = self.total / 100 1000 self.progress_chunk = self.total / 100
1001 self.num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or
1002 multiprocessing.cpu_count())
1001 1003
1002 def launch_processes(self): 1004 def launch_processes(self):
1003 self.task_queue = multiprocessing.Queue() 1005 self.task_queue = multiprocessing.Queue()
@@ -1018,9 +1020,7 @@ class CookerParser(object):
1018 output.put(infos) 1020 output.put(infos)
1019 1021
1020 self.processes = [] 1022 self.processes = []
1021 num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or 1023 for i in xrange(self.num_processes):
1022 multiprocessing.cpu_count())
1023 for i in xrange(num_processes):
1024 process = multiprocessing.Process(target=worker, 1024 process = multiprocessing.Process(target=worker,
1025 args=(self.task_queue, 1025 args=(self.task_queue,
1026 self.result_queue, 1026 self.result_queue,