We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5def00a commit d26c800Copy full SHA for d26c800
examples/plot_input.py
@@ -63,16 +63,14 @@ def update_plot(frame):
63
64
"""
65
global plotdata
66
- block = True # The first read from the queue is blocking ...
67
while True:
68
try:
69
- data = q.get(block=block)
+ data = q.get_nowait()
70
except queue.Empty:
71
break
72
shift = len(data)
73
plotdata = np.roll(plotdata, -shift, axis=0)
74
plotdata[-shift:, :] = data
75
- block = False # ... all further reads are non-blocking
76
for column, line in enumerate(lines):
77
line.set_ydata(plotdata[:, column])
78
return lines
0 commit comments