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




commit f7da08c48a296ac136fa44377da5294f068797c6
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]