summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/windows_events.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-06-08 01:31:50 (GMT)
committerGitHub <noreply@github.com>2018-06-08 01:31:50 (GMT)
commit0738443a5b071a6bd2c18957a06cfe571a7314f2 (patch)
treeb80124e7092baa822bd236aff3522dea9697eb9f /Lib/asyncio/windows_events.py
parenta971a6fdb111bb62911ccf45aa9fe734e2e7a590 (diff)
downloadcpython-0738443a5b071a6bd2c18957a06cfe571a7314f2.zip
cpython-0738443a5b071a6bd2c18957a06cfe571a7314f2.tar.gz
cpython-0738443a5b071a6bd2c18957a06cfe571a7314f2.tar.bz2
bpo-33792: Add selector and proactor windows policies (GH-7487)
(cherry picked from commit 8f4042964d5b0ddf5cdf87862db962ba64e3f64a) Co-authored-by: Yury Selivanov <yury@magic.io>
Diffstat (limited to 'Lib/asyncio/windows_events.py')
-rw-r--r--Lib/asyncio/windows_events.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index d22edec..2ec5427 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -21,7 +21,8 @@ from .log import logger
__all__ = (
'SelectorEventLoop', 'ProactorEventLoop', 'IocpProactor',
- 'DefaultEventLoopPolicy',
+ 'DefaultEventLoopPolicy', 'WindowsSelectorEventLoopPolicy',
+ 'WindowsProactorEventLoopPolicy',
)
@@ -801,8 +802,12 @@ class _WindowsSubprocessTransport(base_subprocess.BaseSubprocessTransport):
SelectorEventLoop = _WindowsSelectorEventLoop
-class _WindowsDefaultEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
+class WindowsSelectorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
_loop_factory = SelectorEventLoop
-DefaultEventLoopPolicy = _WindowsDefaultEventLoopPolicy
+class WindowsProactorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
+ _loop_factory = ProactorEventLoop
+
+
+DefaultEventLoopPolicy = WindowsSelectorEventLoopPolicy