[gnome-settings-daemon/benzea/ci-fixes: 2/7] tests: Set OutputChecker thread to be a daemon thread




commit 0ae626d0dc12d543cdf7f148778e13412f7f47ef
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Jul 19 16:55:48 2021 +0200

    tests: Set OutputChecker thread to be a daemon thread
    
    Otherwise the interpreter can apparently deadlock on shutdown trying to
    join the still running thread.

 tests/output_checker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 35c19f78..7cb1060a 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -43,7 +43,7 @@ class OutputChecker(object):
                     fcntl.fcntl(self._pipe_fd_w, fcntl.F_GETFL) | os.O_CLOEXEC)
 
         # Start copier thread
-        self._thread = threading.Thread(target=self._copy)
+        self._thread = threading.Thread(target=self._copy, daemon=True)
         self._thread.start()
 
     def _copy(self):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]