refs #1107 do not try to avoid races, as there are none now
parent
6163c0b435
commit
ef0920079b
|
@ -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'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue