made pruner a daemon thread

This commit is contained in:
Alok Saldanha
2025-11-08 18:40:33 -05:00
parent 79fef57010
commit d747860118
5 changed files with 22 additions and 5 deletions
+4 -2
View File
@@ -378,8 +378,10 @@ def ip_address():
def start_pruner_thread():
pruner = PruneProcessCache(cache)
background_thread = Thread(target=pruner)
# Run the pruner as a daemon thread so it won't block interpreter
# shutdown (for example when Ctrl-C is used in the main thread).
# This avoids "Exception ignored in: <module 'threading'...>" at exit.
background_thread = Thread(target=pruner, daemon=True)
background_thread.start()