avoid deadlock when only one active thread remains

This commit is contained in:
dcore94 2024-01-15 16:37:56 +01:00
parent ced95da38e
commit dfe6593968
1 changed files with 3 additions and 0 deletions

View File

@ -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):