From dfe65939689a0e8358db67ede1859b6b22905320 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Mon, 15 Jan 2024 16:37:56 +0100 Subject: [PATCH] avoid deadlock when only one active thread remains --- conductor/ConductorWorker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conductor/ConductorWorker.py b/conductor/ConductorWorker.py index 872fc36..c50b119 100644 --- a/conductor/ConductorWorker.py +++ b/conductor/ConductorWorker.py @@ -145,6 +145,9 @@ class ConductorWorker: activecount = threading.active_count() if expectedthreads != activecount: logging.getLogger("pyexec").fatal("!!! Active/expected running threads count is: %d/%d", activecount, expectedthreads) + if activecount == 1: + logging.getLogger("pyexec").fatal("!!! Exiting") + sys.exit(1) def exc(taskType, inputData, startTime, retryCount, status, callbackAfterSeconds, pollCount):