From 16103cb8b7a5a00a0b4694473eecd4c5d0c2a49a Mon Sep 17 00:00:00 2001 From: Simon Alibert Date: Sun, 3 Nov 2024 18:07:55 +0100 Subject: [PATCH] Fix hanging --- lerobot/common/datasets/image_writer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lerobot/common/datasets/image_writer.py b/lerobot/common/datasets/image_writer.py index 7b9ed0e4..180069d7 100644 --- a/lerobot/common/datasets/image_writer.py +++ b/lerobot/common/datasets/image_writer.py @@ -80,6 +80,7 @@ def worker_process(queue: queue.Queue, num_threads: int): threads = [] for _ in range(num_threads): t = threading.Thread(target=worker_thread_process, args=(queue,)) + t.daemon = True t.start() threads.append(t) for t in threads: @@ -129,6 +130,7 @@ class ImageWriter: self.queue = multiprocessing.JoinableQueue() for _ in range(self.num_processes): p = multiprocessing.Process(target=worker_process, args=(self.queue, self.num_threads)) + p.daemon = True p.start() self.processes.append(p)