runtime_plot: bump last_values timeout 1s -> 5s, narrow except
Dispatch chain (queue poll + Qt signal/slot + main thread) can exceed 1s on loaded machines; bare except masked everything other than queue.Empty.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import queue
|
||||||
import multiprocessing as mp
|
import multiprocessing as mp
|
||||||
from threading import Timer
|
from threading import Timer
|
||||||
from time import sleep, monotonic
|
from time import sleep, monotonic
|
||||||
@@ -367,7 +368,7 @@ class RuntimePlot:
|
|||||||
self.msg_queue_in.get()
|
self.msg_queue_in.get()
|
||||||
self.msg_queue_out.put({"command": "last_values"})
|
self.msg_queue_out.put({"command": "last_values"})
|
||||||
try:
|
try:
|
||||||
res = self.msg_queue_in.get(timeout=1)
|
res = self.msg_queue_in.get(timeout=5)
|
||||||
except:
|
except queue.Empty:
|
||||||
raise ETUMRuntimeError(f"Impossible to retrieve the last values of the \"{self.name}\" plot")
|
raise ETUMRuntimeError(f"Impossible to retrieve the last values of the \"{self.name}\" plot")
|
||||||
return res
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user