From 1ac5e09f681dfaeb3b980304fb09b82713c2b3f2 Mon Sep 17 00:00:00 2001 From: yxlllc <33565655+yxlllc@users.noreply.github.com> Date: Sat, 20 Apr 2024 19:19:34 +0800 Subject: [PATCH] kill child process after closing the gui (#1984) --- gui_v1.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui_v1.py b/gui_v1.py index 6247af8..b5b35d4 100644 --- a/gui_v1.py +++ b/gui_v1.py @@ -107,7 +107,9 @@ if __name__ == "__main__": opt_q = Queue() n_cpu = min(cpu_count(), 8) for _ in range(n_cpu): - Harvest(inp_q, opt_q).start() + p = Harvest(inp_q, opt_q) + p.daemon = True + p.start() class GUIConfig: def __init__(self) -> None: