We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 810264c + bccb781 commit 9b70bc7Copy full SHA for 9b70bc7
1 file changed
dotflow/core/workflow.py
@@ -16,7 +16,18 @@
16
from dotflow.core.types import TypeExecution, TypeStatus
17
from dotflow.utils import basic_callback
18
19
-_mp = get_context("fork") if sys.platform != "win32" else get_context("spawn")
+if sys.platform == "win32":
20
+ _mp = get_context("spawn")
21
+else:
22
+ import multiprocessing
23
+
24
+ if sys.platform == "darwin" and hasattr(
25
+ multiprocessing, "set_forkserver_preload"
26
+ ):
27
+ import os
28
29
+ os.environ.setdefault("OBJC_DISABLE_INITIALIZE_FORK_SAFETY", "YES")
30
+ _mp = get_context("fork")
31
32
33
def grouper(tasks: list[Task]) -> dict[str, list[Task]]:
0 commit comments