Skip to content

Commit 222020d

Browse files
committed
asyncio: enhance documentation of platform support
1 parent 8bfc06b commit 222020d

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

Doc/library/asyncio-eventloops.rst

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ the execution of the process.
2424
Equivalent to calling ``get_event_loop_policy().new_event_loop()``.
2525

2626

27+
.. _asyncio-event-loops:
28+
2729
Available event loops
2830
---------------------
2931

@@ -57,6 +59,7 @@ Example to use a :class:`ProactorEventLoop` on Windows::
5759
loop = asyncio.ProactorEventLoop()
5860
asyncio.set_event_loop(loop)
5961

62+
.. _asyncio-platform-support:
6063

6164
Platform support
6265
----------------
@@ -70,21 +73,27 @@ Windows
7073
Common limits of Windows event loops:
7174

7275
- :meth:`~BaseEventLoop.create_unix_server` and
73-
:meth:`~BaseEventLoop.create_unix_server` are not supported: specific to UNIX
76+
:meth:`~BaseEventLoop.create_unix_server` are not supported: the socket
77+
family :data:`socket.AF_UNIX` is specific to UNIX
7478
- :meth:`~BaseEventLoop.add_signal_handler` and
7579
:meth:`~BaseEventLoop.remove_signal_handler` are not supported
76-
- Pipes are not supported: :meth:`~BaseEventLoop.connect_read_pipe` and
77-
:meth:`~BaseEventLoop.connect_write_pipe`
78-
- :meth:`EventLoopPolicy.set_child_watcher` is not supported
80+
- :meth:`EventLoopPolicy.set_child_watcher` is not supported.
81+
:class:`ProactorEventLoop` supports subprocesses. It has only one
82+
implementation to watch child processes, there is no need to configure it.
7983

8084
:class:`SelectorEventLoop` specific limits:
8185

8286
- :class:`~selectors.SelectSelector` is used but it only supports sockets,
8387
see the `MSDN documentation of select
84-
<http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx>`_.
85-
- it is not possible to execute subprocesses
88+
<http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx>`_
8689
- :meth:`~BaseEventLoop.add_reader` and :meth:`~BaseEventLoop.add_writer` only
8790
accept file descriptors of sockets
91+
- Pipes are not supported
92+
(ex: :meth:`~BaseEventLoop.connect_read_pipe`,
93+
:meth:`~BaseEventLoop.connect_write_pipe`)
94+
- :ref:`Subprocesses <asyncio-subprocess>` are not supported
95+
(ex: :meth:`~BaseEventLoop.subprocess_exec`,
96+
:meth:`~BaseEventLoop.subprocess_shell`)
8897

8998
:class:`ProactorEventLoop` specific limits:
9099

@@ -95,9 +104,10 @@ Common limits of Windows event loops:
95104
not supported
96105

97106
The resolution of the monotonic clock on Windows is usually around 15.6 msec.
98-
The best resolution is 0.5 msec. The exact resolution depends on the hardware
99-
(availability of HPET) and the Windows configuration. See :ref:`asyncio delayed
100-
calls <asyncio-delayed-calls>`.
107+
The best resolution is 0.5 msec. The resolution depends on the hardware
108+
(availability of `HPET
109+
<http://fr.wikipedia.org/wiki/High_Precision_Event_Timer>`_) and on the Windows
110+
configuration. See :ref:`asyncio delayed calls <asyncio-delayed-calls>`.
101111

102112

103113
Mac OS X

Doc/library/asyncio-subprocess.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. currentmodule:: asyncio
22

3+
.. _asyncio-subprocess:
4+
35
Subprocess
46
==========
57

@@ -16,6 +18,11 @@ Example to use it on Windows::
1618
loop = asyncio.ProactorEventLoop()
1719
asyncio.set_event_loop(loop)
1820

21+
.. seealso::
22+
23+
:ref:`Available event loops <asyncio-event-loops>` and :ref:`Platform
24+
support <asyncio-platform-support>`.
25+
1926

2027
Create a subprocess: high-level API using Process
2128
-------------------------------------------------

0 commit comments

Comments
 (0)