summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-08-25 23:02:28 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-08-25 23:02:28 (GMT)
commite863739e61996f5bf48a14b2fe69a95d23fe45e0 (patch)
tree26dc5c908419c63e9f555ce87dc27f2c3c8aae00 /Doc
parent54c69c2fe3a6d9489407e751ea61c6c2dee1e9e5 (diff)
parentd84fd73de2823afd8da5c3e5937d51f7ecad8a34 (diff)
downloadcpython-e863739e61996f5bf48a14b2fe69a95d23fe45e0.zip
cpython-e863739e61996f5bf48a14b2fe69a95d23fe45e0.tar.gz
cpython-e863739e61996f5bf48a14b2fe69a95d23fe45e0.tar.bz2
(Merge 3.4) Issue #22063: Fix asyncio documentation of socket and pipe
operations regarding to non-blocking mode. The non-blocking mode does not matter when using a ProactorEventLoop, only for SelectorEventLoop.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-eventloop.rst19
1 files changed, 14 insertions, 5 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index ff685bb..e9de4ad 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -336,7 +336,8 @@ Low-level socket operations
representing the data received. The maximum amount of data to be received
at once is specified by *nbytes*.
- The socket *sock* must be non-blocking.
+ With :class:`SelectorEventLoop` event loop, the socket *sock* must be
+ non-blocking.
This method is a :ref:`coroutine <coroutine>`.
@@ -352,7 +353,8 @@ Low-level socket operations
an exception is raised, and there is no way to determine how much data, if
any, was successfully processed by the receiving end of the connection.
- The socket *sock* must be non-blocking.
+ With :class:`SelectorEventLoop` event loop, the socket *sock* must be
+ non-blocking.
This method is a :ref:`coroutine <coroutine>`.
@@ -370,7 +372,8 @@ Low-level socket operations
:py:data:`~socket.AF_INET` and :py:data:`~socket.AF_INET6` address families.
Use :meth:`getaddrinfo` to resolve the hostname asynchronously.
- The socket *sock* must be non-blocking.
+ With :class:`SelectorEventLoop` event loop, the socket *sock* must be
+ non-blocking.
This method is a :ref:`coroutine <coroutine>`.
@@ -418,13 +421,16 @@ Connect pipes
.. method:: BaseEventLoop.connect_read_pipe(protocol_factory, pipe)
- Register read pipe in eventloop. Set the *pipe* to non-blocking mode.
+ Register read pipe in eventloop.
*protocol_factory* should instantiate object with :class:`Protocol`
interface. *pipe* is a :term:`file-like object <file object>`.
Return pair ``(transport, protocol)``, where *transport* supports the
:class:`ReadTransport` interface.
+ With :class:`SelectorEventLoop` event loop, the *pipe* is set to
+ non-blocking mode.
+
This method is a :ref:`coroutine <coroutine>`.
.. method:: BaseEventLoop.connect_write_pipe(protocol_factory, pipe)
@@ -432,10 +438,13 @@ Connect pipes
Register write pipe in eventloop.
*protocol_factory* should instantiate object with :class:`BaseProtocol`
- interface. Pipe is file-like object already switched to nonblocking.
+ interface. *pipe* is file-like object.
Return pair (transport, protocol), where transport support
:class:`WriteTransport` interface.
+ With :class:`SelectorEventLoop` event loop, the *pipe* is set to
+ non-blocking mode.
+
This method is a :ref:`coroutine <coroutine>`.
.. seealso::