diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 4be95dd7fb..7f232f2b36 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -2093,11 +2093,7 @@ class Parser(multiprocessing.Process): | |||
2093 | pending = [] | 2093 | pending = [] |
2094 | try: | 2094 | try: |
2095 | while True: | 2095 | while True: |
2096 | try: | 2096 | if self.quit.is_set(): |
2097 | self.quit.get_nowait() | ||
2098 | except queue.Empty: | ||
2099 | pass | ||
2100 | else: | ||
2101 | break | 2097 | break |
2102 | 2098 | ||
2103 | if pending: | 2099 | if pending: |
@@ -2194,7 +2190,7 @@ class CookerParser(object): | |||
2194 | if self.toparse: | 2190 | if self.toparse: |
2195 | bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata) | 2191 | bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata) |
2196 | 2192 | ||
2197 | self.parser_quit = multiprocessing.Queue(maxsize=self.num_processes) | 2193 | self.parser_quit = multiprocessing.Event() |
2198 | self.result_queue = multiprocessing.Queue() | 2194 | self.result_queue = multiprocessing.Queue() |
2199 | 2195 | ||
2200 | def chunkify(lst,n): | 2196 | def chunkify(lst,n): |
@@ -2226,8 +2222,7 @@ class CookerParser(object): | |||
2226 | else: | 2222 | else: |
2227 | bb.error("Parsing halted due to errors, see error messages above") | 2223 | bb.error("Parsing halted due to errors, see error messages above") |
2228 | 2224 | ||
2229 | for process in self.processes: | 2225 | self.parser_quit.set() |
2230 | self.parser_quit.put(None) | ||
2231 | 2226 | ||
2232 | # Cleanup the queue before call process.join(), otherwise there might be | 2227 | # Cleanup the queue before call process.join(), otherwise there might be |
2233 | # deadlocks. | 2228 | # deadlocks. |
@@ -2257,10 +2252,6 @@ class CookerParser(object): | |||
2257 | if hasattr(process, "close"): | 2252 | if hasattr(process, "close"): |
2258 | process.close() | 2253 | process.close() |
2259 | 2254 | ||
2260 | self.parser_quit.close() | ||
2261 | # Allow data left in the cancel queue to be discarded | ||
2262 | self.parser_quit.cancel_join_thread() | ||
2263 | |||
2264 | def sync_caches(): | 2255 | def sync_caches(): |
2265 | for c in self.bb_caches.values(): | 2256 | for c in self.bb_caches.values(): |
2266 | c.sync() | 2257 | c.sync() |