Skip to content

Commit

Permalink
Make backgrounding supported on macOS [release]
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayP13 committed Dec 27, 2023
1 parent 2f76dbe commit 7fe963f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/background_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_in_background_process(func: Callable, *args, **kwargs) -> tuple[Process,
orig_start_method = get_start_method()
if sys.platform == "darwin": # pragma: no cover
# See: https://bugs.python.org/issue33725
set_start_method("fork")
set_start_method("fork", force=True)
p = Process(
target=partial(_process_func_wrapper, func),
args=(pipe, dill.dumps(kwargs), *args),
Expand All @@ -49,7 +49,7 @@ def run_in_background_process(func: Callable, *args, **kwargs) -> tuple[Process,
p.start()
if sys.platform == "darwin": # pragma: no cover
# See: https://bugs.python.org/issue33725
set_start_method(orig_start_method)
set_start_method(orig_start_method, force=True)
return p, pipe


Expand Down

0 comments on commit 7fe963f

Please sign in to comment.