diff --git a/examples/python/multithreading/main.py b/examples/python/multithreading/main.py index eeb6f2ed9f49..aa1a2f53883e 100755 --- a/examples/python/multithreading/main.py +++ b/examples/python/multithreading/main.py @@ -26,11 +26,16 @@ def main() -> None: rr.script_setup(args, "multithreading") + threads = [] for i in range(10): t = threading.Thread( target=rect_logger, args=("thread/{}".format(i), [random.randrange(255) for _ in range(3)]) ) t.start() + threads.append(t) + + for t in threads: + t.join() rr.script_teardown(args)