make data fetch happen in a second thread

This commit is contained in:
Brendan Haines 2020-03-02 16:11:21 -07:00
parent 1e0fd3ec3f
commit 84e987ee8f

View File

@ -82,7 +82,12 @@ curdoc().add_root(row(controls, plot, width=800))
# curdoc().add_root(row(plot, width=800)) # curdoc().add_root(row(plot, width=800))
curdoc().title = "test" curdoc().title = "test"
t = threading.timer(0.5,update_data) def control_thread():
while True:
time.sleep(0.01)
update_data()
t = threading.Thread(target=control_thread)
t.start() t.start()
# while True: # while True:
# time.sleep(0.1) # time.sleep(0.1)