INNER CODE UNIT · Python

write_loop

TheOpenSpaceProgram/osp-magnum · scripts/framework_debug_fifo.py:26

def write_loop():
    global exit_write_loop
    global latest_graph_data
    while not exit_write_loop:
        if latest_graph_data:
            graph_data_write = latest_graph_data
            latest_graph_data = ""
            print("writing")

            p = subprocess.run(["dot", "-o", "/tmp/graph.png", "-Tpng"], input=graph_data_write, text=True)
        time.sleep(0.25)


write_loop_thread = threading.Thread(target=write_loop)
write_loop_thread.start()

try:
    while True:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…