Skip to content

Commit

Permalink
Always spawn instead of fork in multiprocessing example (#1922)
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs authored Apr 19, 2023
1 parent 2316076 commit fce9cf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/python/multiprocessing/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fce9cf4

Please sign in to comment.