Skip to content

Commit 937ffec

Browse files
committed
use the ProactorEventLoop on windows
1 parent c37e7fc commit 937ffec

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

distributed/config.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import asyncio
21
import logging
32
import logging.config
43
import os
@@ -9,7 +8,7 @@
98
import dask
109
from dask.utils import import_required
1110

12-
from .compatibility import WINDOWS, logging_names
11+
from .compatibility import logging_names
1312

1413
config = dask.config.config
1514

@@ -166,13 +165,8 @@ def initialize_event_loop(config):
166165
" pip install uvloop",
167166
)
168167
uvloop.install()
169-
elif event_loop in {"asyncio", "tornado"}:
170-
if WINDOWS:
171-
# WindowsProactorEventLoopPolicy is not compatible with tornado 6
172-
# fallback to the pre-3.8 default of Selector
173-
# https://github.com/tornadoweb/tornado/issues/2608
174-
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
175-
else:
168+
return
169+
if event_loop not in {"asyncio", "tornado"}:
176170
raise ValueError(
177171
"Expected distributed.admin.event-loop to be in ('asyncio', 'tornado', 'uvloop'), got %s"
178172
% dask.config.get("distributed.admin.event-loop")

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ psutil >= 5.0
88
sortedcontainers !=2.0.0, !=2.0.1
99
tblib >= 1.6.0
1010
toolz >= 0.8.2
11-
tornado >= 6.0.3
11+
tornado >= 6.1
1212
zict >= 0.1.3
1313
pyyaml
1414
setuptools

0 commit comments

Comments
 (0)