diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-09-25 15:27:08 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2018-09-25 15:27:08 (GMT) |
commit | 6ea29c5e90dde6c240bd8e0815614b52ac307ea1 (patch) | |
tree | b13f44020dc742f6d06d8adb71961b734b06c2ea /Doc | |
parent | c8c0249c9e8f61ab7670119a5a5278354df27bbb (diff) | |
download | cpython-6ea29c5e90dde6c240bd8e0815614b52ac307ea1.zip cpython-6ea29c5e90dde6c240bd8e0815614b52ac307ea1.tar.gz cpython-6ea29c5e90dde6c240bd8e0815614b52ac307ea1.tar.bz2 |
bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/asyncio-platforms.rst | 16 | ||||
-rw-r--r-- | Doc/library/asyncio-policy.rst | 14 | ||||
-rw-r--r-- | Doc/whatsnew/3.8.rst | 5 |
3 files changed, 24 insertions, 11 deletions
diff --git a/Doc/library/asyncio-platforms.rst b/Doc/library/asyncio-platforms.rst index f8ecb58..81d840e 100644 --- a/Doc/library/asyncio-platforms.rst +++ b/Doc/library/asyncio-platforms.rst @@ -23,6 +23,10 @@ All Platforms Windows ======= +.. versionchanged:: 3.8 + + On Windows, :class:`ProactorEventLoop` is now the default event loop. + All event loops on Windows do not support the following methods: * :meth:`loop.create_unix_connection` and @@ -67,16 +71,8 @@ Windows configuration. Subprocess Support on Windows ----------------------------- -:class:`SelectorEventLoop` on Windows does not support subproceses. -On Windows, :class:`ProactorEventLoop` should be used instead:: - - import asyncio - - asyncio.set_event_loop_policy( - asyncio.WindowsProactorEventLoopPolicy()) - - asyncio.run(your_code()) - +On Windows, the default event loop :class:`ProactorEventLoop` supports +subprocesses, whereas :class:`SelectorEventLoop` does not. The :meth:`policy.set_child_watcher() <AbstractEventLoopPolicy.set_child_watcher>` function is also diff --git a/Doc/library/asyncio-policy.rst b/Doc/library/asyncio-policy.rst index 42f936d..560f8b3 100644 --- a/Doc/library/asyncio-policy.rst +++ b/Doc/library/asyncio-policy.rst @@ -92,11 +92,23 @@ asyncio ships with the following built-in policies: .. class:: DefaultEventLoopPolicy The default asyncio policy. Uses :class:`SelectorEventLoop` - on both Unix and Windows platforms. + on Unix and :class:`ProactorEventLoop` on Windows. There is no need to install the default policy manually. asyncio is configured to use the default policy automatically. + .. versionchanged:: 3.8 + + On Windows, :class:`ProactorEventLoop` is now used by default. + + +.. class:: WindowsSelectorEventLoopPolicy + + An alternative event loop policy that uses the + :class:`SelectorEventLoop` event loop implementation. + + Availability: Windows. + .. class:: WindowsProactorEventLoopPolicy diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index e37a70f..89764c8 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -116,6 +116,11 @@ New Modules Improved Modules ================ +asyncio +------- + +On Windows, the default event loop is now :class:`~asyncio.ProactorEventLoop`. + os.path ------- |