All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] command: Trigger updateCache to shut down any active parser threads
@ 2014-08-21 20:45 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-08-21 20:45 UTC (permalink / raw)
  To: bitbake-devel

If we trigger a shutdown whilst parsing for whatever reason, in some
cases we were not closing down the parser threads. This change
ensures we do so. The function names are not entirely intuitive
but the behaviour is more correct (and commented). The previous bug
with the stdout failure would trigger this one, if there was a cold
cache and parsing was required (but not otherwise).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index d797fcf..0cfed0a 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -87,6 +87,9 @@ class Command:
     def runAsyncCommand(self):
         try:
             if self.cooker.state in (bb.cooker.state.error, bb.cooker.state.shutdown, bb.cooker.state.forceshutdown):
+                # updateCache will trigger a shutdown of the parser
+                # and then raise BBHandledException triggering an exit
+                self.cooker.updateCache()
                 return False
             if self.currentAsyncCommand is not None:
                 (command, options) = self.currentAsyncCommand




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-21 20:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-21 20:45 [PATCH] command: Trigger updateCache to shut down any active parser threads Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.