Skip to content

Commit

Permalink
Check whether running on Windows Subsystem for Linux. (dask#2543)
Browse files Browse the repository at this point in the history
This works around an issue in WSL that causes Distributed with
default config to crash on initializion. Fix by checking whether
the stack is WSL. If so, proceed as if Windows is running, which
fixes the issue.
  • Loading branch information
jurreht committed Jun 25, 2019
1 parent 991391c commit 68a6e1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from numbers import Number
import operator
import os
import platform
import re
import shutil
import socket
Expand Down Expand Up @@ -62,7 +63,12 @@


def _initialize_mp_context():
if PY3 and not sys.platform.startswith("win") and "PyPy" not in sys.version:
if (
PY3
and not sys.platform.startswith("win")
and "PyPy" not in sys.version
and "microsoft" not in platform.uname()[3].lower()
):
method = dask.config.get("distributed.worker.multiprocessing-method")
ctx = multiprocessing.get_context(method)
# Makes the test suite much faster
Expand Down

0 comments on commit 68a6e1f

Please sign in to comment.