diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2022-11-29 14:09:45 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-12-08 10:49:53 +0000 |
commit | 2015bf3eb82e043c3e3f75de9951d9133c8359dd (patch) | |
tree | 00afd1736bf8d920e6dcc7a101521232fc7f13aa /bitbake | |
parent | 1e7cb630c7c53c991603cc8c132a6dcbc2e5fe34 (diff) | |
download | poky-2015bf3eb82e043c3e3f75de9951d9133c8359dd.tar.gz |
bitbake: cooker: Start sync thread a little earlier
Starts the sync thread slightly earlier to give it some extra time to
dump out the caches while the main process tears down the parsing
processes
(Bitbake rev: 105f2897b0618713b036fc0f7a6e0f3e78d1707a)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 7f232f2b36..728ef09675 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -2222,6 +2222,13 @@ class CookerParser(object): | |||
2222 | else: | 2222 | else: |
2223 | bb.error("Parsing halted due to errors, see error messages above") | 2223 | bb.error("Parsing halted due to errors, see error messages above") |
2224 | 2224 | ||
2225 | def sync_caches(): | ||
2226 | for c in self.bb_caches.values(): | ||
2227 | c.sync() | ||
2228 | |||
2229 | self.syncthread = threading.Thread(target=sync_caches, name="SyncThread") | ||
2230 | self.syncthread.start() | ||
2231 | |||
2225 | self.parser_quit.set() | 2232 | self.parser_quit.set() |
2226 | 2233 | ||
2227 | # Cleanup the queue before call process.join(), otherwise there might be | 2234 | # Cleanup the queue before call process.join(), otherwise there might be |
@@ -2252,13 +2259,7 @@ class CookerParser(object): | |||
2252 | if hasattr(process, "close"): | 2259 | if hasattr(process, "close"): |
2253 | process.close() | 2260 | process.close() |
2254 | 2261 | ||
2255 | def sync_caches(): | ||
2256 | for c in self.bb_caches.values(): | ||
2257 | c.sync() | ||
2258 | 2262 | ||
2259 | sync = threading.Thread(target=sync_caches, name="SyncThread") | ||
2260 | self.syncthread = sync | ||
2261 | sync.start() | ||
2262 | bb.codeparser.parser_cache_savemerge() | 2263 | bb.codeparser.parser_cache_savemerge() |
2263 | bb.fetch.fetcher_parse_done() | 2264 | bb.fetch.fetcher_parse_done() |
2264 | if self.cooker.configuration.profile: | 2265 | if self.cooker.configuration.profile: |