(original) (raw)
changeset: 92241:74236c8bf064 parent: 92239:959fb56294ec parent: 92240:b94da2b69d13 user: Victor Stinner victor.stinner@gmail.com date: Tue Aug 26 01:02:28 2014 +0200 files: Doc/library/asyncio-eventloop.rst description: (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. diff -r 959fb56294ec -r 74236c8bf064 Doc/library/asyncio-eventloop.rst --- a/Doc/library/asyncio-eventloop.rst Tue Aug 26 00:23:23 2014 +0200 +++ b/Doc/library/asyncio-eventloop.rst Tue Aug 26 01:02:28 2014 +0200 @@ -336,7 +336,8 @@ 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 `. @@ -352,7 +353,8 @@ 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 `. @@ -370,7 +372,8 @@ :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 `. @@ -418,13 +421,16 @@ .. 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 `. 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 `. .. method:: BaseEventLoop.connect_write_pipe(protocol_factory, pipe) @@ -432,10 +438,13 @@ 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 `. .. seealso::/victor.stinner@gmail.com