From ef0920079b17f37111299ab9b4f35a6a7f6179c5 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Wed, 6 Nov 2024 13:35:12 +0100 Subject: [PATCH] refs #1107 do not try to avoid races, as there are none now --- src/opengnsys/workers/oglive_worker.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/opengnsys/workers/oglive_worker.py b/src/opengnsys/workers/oglive_worker.py index 599aba5..91bec00 100644 --- a/src/opengnsys/workers/oglive_worker.py +++ b/src/opengnsys/workers/oglive_worker.py @@ -150,11 +150,10 @@ class ogLiveWorker(ServerWorker): if 'thread' not in elem: continue logger.debug (f'considering thread ({k})') try: elem['thread'].join (0.05) - except RuntimeError: pass ## race condition: a thread is created and this code runs before it is start()ed if not elem['thread'].is_alive(): logger.debug (f'is no longer alive, k ({k}) thread ({elem["thread"]})') elem['running'] = False - elem['result'] = elem['thread'].result ## race condition: KeyError: 'thread' + elem['result'] = elem['thread'].result del elem['thread'] self.notifier (k, elem['result'])