Couple of small fixes

This commit is contained in:
Miroslav Štampar 2026-06-05 12:07:15 +02:00
parent 8110ccb38a
commit 69efd623c9
6 changed files with 17 additions and 16 deletions

View file

@ -213,7 +213,14 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
if numThreads > 1:
logger.info("waiting for threads to finish%s" % (" (Ctrl+C was pressed)" if isinstance(ex, KeyboardInterrupt) else ""))
try:
while threading.active_count() > 1:
while True:
alive = False
for thread in threads:
if thread.is_alive():
alive = True
break
if not alive:
break
time.sleep(0.1)
except KeyboardInterrupt: