summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index e88ad24cf6..427078df0b 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2171,15 +2171,16 @@ class CookerParser(object):
2171 self.parser_quit = multiprocessing.Event() 2171 self.parser_quit = multiprocessing.Event()
2172 self.result_queue = multiprocessing.Queue() 2172 self.result_queue = multiprocessing.Queue()
2173 2173
2174 for jobid in range(len(self.willparse)): 2174 # Have to pass in willparse at fork time so all parsing processes have the unpickleable data
2175 self.toparse_queue.put(jobid) 2175 # then access it by index from the parse queue.
2176
2177 for i in range(0, self.num_processes): 2176 for i in range(0, self.num_processes):
2178 parser = Parser(self.willparse, self.toparse_queue, self.result_queue, self.parser_quit, self.cooker.configuration.profile) 2177 parser = Parser(self.willparse, self.toparse_queue, self.result_queue, self.parser_quit, self.cooker.configuration.profile)
2179 parser.start() 2178 parser.start()
2180 self.process_names.append(parser.name) 2179 self.process_names.append(parser.name)
2181 self.processes.append(parser) 2180 self.processes.append(parser)
2182 2181
2182 for jobid in range(len(self.willparse)):
2183 self.toparse_queue.put(jobid)
2183 self.toparse_queue.close() 2184 self.toparse_queue.close()
2184 2185
2185 self.results = itertools.chain(self.results, self.parse_generator()) 2186 self.results = itertools.chain(self.results, self.parse_generator())
@@ -2290,7 +2291,7 @@ class CookerParser(object):
2290 yield result 2291 yield result
2291 2292
2292 if not (self.parsed >= self.toparse): 2293 if not (self.parsed >= self.toparse):
2293 raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? Exiting.", None) 2294 raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? (%s %s of %s) Exiting." % (len(self.processes), self.parsed, self.toparse), None)
2294 2295
2295 2296
2296 def parse_next(self): 2297 def parse_next(self):