summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/bb/cooker.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 05be9bef6..33452e7b9 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1674,6 +1674,7 @@ class BBCooker:
if self.parser:
self.parser.shutdown(clean=not force, force=force)
+ self.parser.final_cleanup()
def finishcommand(self):
self.state = state.initial
@@ -2063,6 +2064,7 @@ class CookerParser(object):
self.start()
self.haveshutdown = False
+ self.syncthread = None
def start(self):
self.results = self.load_cached()
@@ -2132,8 +2134,8 @@ class CookerParser(object):
c.sync()
sync = threading.Thread(target=sync_caches)
+ self.syncthread = sync
sync.start()
- multiprocessing.util.Finalize(None, sync.join, exitpriority=-100)
bb.codeparser.parser_cache_savemerge()
bb.fetch.fetcher_parse_done()
if self.cooker.configuration.profile:
@@ -2147,6 +2149,10 @@ class CookerParser(object):
bb.utils.process_profilelog(profiles, pout = pout)
print("Processed parsing statistics saved to %s" % (pout))
+ def final_cleanup(self):
+ if self.syncthread:
+ self.syncthread.join()
+
def load_cached(self):
for mc, cache, filename, appends in self.fromcache:
cached, infos = cache.load(filename, appends)