diff options
author | Yury Selivanov <yury@magic.io> | 2018-06-08 00:44:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 00:44:57 (GMT) |
commit | 8f4042964d5b0ddf5cdf87862db962ba64e3f64a (patch) | |
tree | bdfe505b29985bf5fdbbec72bf1a9cd5e4856419 /Lib/asyncio/windows_events.py | |
parent | 52698c7ad9eae9feb35839fde17a7d1da8036a9b (diff) | |
download | cpython-8f4042964d5b0ddf5cdf87862db962ba64e3f64a.zip cpython-8f4042964d5b0ddf5cdf87862db962ba64e3f64a.tar.gz cpython-8f4042964d5b0ddf5cdf87862db962ba64e3f64a.tar.bz2 |
bpo-33792: Add selector and proactor windows policies (GH-7487)
Diffstat (limited to 'Lib/asyncio/windows_events.py')
-rw-r--r-- | Lib/asyncio/windows_events.py | 11 |
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 |