Skip to content

Commit 499b509

Browse files
author
arch
committed
kill hanging python treads at the end on windows
1 parent f0c2a38 commit 499b509

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

funscript_editor/ui/funscript_generator_window.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import sys
22
import logging
33
import os
4+
import time
45
import platform
56
import cv2
67

@@ -108,6 +109,10 @@ def __funscript_generated(self, funscript, msg, success) -> None:
108109

109110
self.__logger.info("Save result to %s", self.output_file)
110111
if not success: self.__show_message(msg, error=True)
112+
if platform.system() == 'Windows':
113+
time.sleep(0.5)
114+
os.system("taskkill /f /im funscript-editor.exe")
115+
111116
# os._exit(os.EX_OK)
112117
sys.exit()
113118

0 commit comments

Comments
 (0)