bitbake: runqueue: Allow rehash loop to exit in case of interrupts

The initial hash serve loop exits in the case where interrupts are present
but probably checks a bit too often. Tweak that and also allow the slow
rehash loop to break on interrupt, improving bitbake Ctrl+C response.

(Bitbake rev: 4534365591fd17bcc2b684900863b67bc69519ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-05-24 11:45:59 +01:00
parent 2824b5e667
commit d89b436835

View File

@@ -1285,7 +1285,8 @@ class RunQueueData:
dealtwith.add(tid)
todeal.remove(tid)
self.prepare_task_hash(tid)
bb.event.check_for_interrupts(self.cooker.data)
bb.event.check_for_interrupts(self.cooker.data)
if time.time() > (lasttime + 30):
lasttime = time.time()
@@ -2602,6 +2603,7 @@ class RunQueueExecute:
next |= self.rqdata.runtaskentries[tid].revdeps
total.remove(tid)
next.intersection_update(total)
bb.event.check_for_interrupts(self.cooker.data)
if time.time() > (lasttime + 30):
lasttime = time.time()