diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 709e69493d..f28951cce5 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -2230,6 +2230,14 @@ class CookerParser(object): else: bb.error("Parsing halted due to errors, see error messages above") + # Cleanup the queue before call process.join(), otherwise there might be + # deadlocks. + while True: + try: + self.result_queue.get(timeout=0.25) + except queue.Empty: + break + def sync_caches(): for c in self.bb_caches.values(): bb.cache.SiggenRecipeInfo.reset() @@ -2240,14 +2248,6 @@ class CookerParser(object): self.parser_quit.set() - # Cleanup the queue before call process.join(), otherwise there might be - # deadlocks. - while True: - try: - self.result_queue.get(timeout=0.25) - except queue.Empty: - break - for process in self.processes: process.join(0.5)