refs #1107 do not try to avoid races, as there are none now

ogcore1
Natalia Serrano 2024-11-06 13:35:12 +01:00
parent 6163c0b435
commit ef0920079b
1 changed files with 1 additions and 2 deletions

View File

@ -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'])