Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions distributed/compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

PYPY = platform.python_implementation().lower() == "pypy"
WINDOWS = sys.platform.startswith("win")
OSX = sys.platform == "darwin"

if sys.version_info[:2] >= (3, 7):
from asyncio import get_running_loop
Expand Down
11 changes: 10 additions & 1 deletion distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
except ImportError:
PollIOLoop = None # dropped in tornado 6.0

from .compatibility import PYPY, WINDOWS, get_running_loop
from .compatibility import PYPY, OSX, WINDOWS, get_running_loop
from .metrics import time


Expand All @@ -77,6 +77,15 @@ def _initialize_mp_context():
return multiprocessing
else:
method = dask.config.get("distributed.worker.multiprocessing-method")
if method == "forkserver" and OSX:
logger.debug(
"forkserver multiprocessing method disabled on OSX. "
"Switching to spawn. "
"set `distributed.worker.multiprocessing-method` to spawn "
"to remove this warning. "
"https://docs.dask.org/en/latest/configuration.html"
)
method = "spawn"
ctx = multiprocessing.get_context(method)
# Makes the test suite much faster
preload = ["distributed"]
Expand Down