From 9ec8de11efa36c5f9f2dd295c750ed34d7ec0e7f Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Wed, 19 Apr 2023 14:42:25 +0200 Subject: [PATCH] Always spawn instead of fork (See: #1921) --- examples/python/multiprocessing/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/python/multiprocessing/main.py b/examples/python/multiprocessing/main.py index 7261981cbd25..dae502832a6a 100755 --- a/examples/python/multiprocessing/main.py +++ b/examples/python/multiprocessing/main.py @@ -32,6 +32,11 @@ def main() -> None: task("main_task") + # Using multiprocessing with "fork" results in a hang on shutdown so + # always use "spawn" + # TODO(https://github.com/rerun-io/rerun/issues/1921) + multiprocessing.set_start_method("spawn") + p = multiprocessing.Process(target=task, args=("child_task",)) p.start() p.join()