Commit 4cafaa0f authored by Rousseau Vincent's avatar Rousseau Vincent
Browse files

Add exit in thread kill close #2

parent 27a2174a
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
...@@ -39,6 +39,9 @@ t = threading.Thread(target=getMeasurements) ...@@ -39,6 +39,9 @@ t = threading.Thread(target=getMeasurements)
t.start() t.start()
while True: while True:
if t.isAlive() == False:
print("Exiting acquisition thread died")
exit()
with measurement_lock: with measurement_lock:
influx_client.write_points(measurement) influx_client.write_points(measurement)
measurement.clear() measurement.clear()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment