Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1222)

Unified Diff: Doc/library/asyncio-eventloop.rst

Issue 66430046: docs refactoring
Patch Set: v2 Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Doc/library/asyncio-stream.rst » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Doc/library/asyncio-eventloop.rst
===================================================================
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -102,7 +102,8 @@
Run until the :class:`Future` is done.
- If the argument is a coroutine, it is wrapped in a :class:`Task`.
+ If the argument is a :ref:`coroutine <coroutine>`, it is wrapped
+ in a :class:`Task`.
Return the Future's result, or raise its exception.
@@ -207,7 +208,7 @@
socket type :py:data:`~socket.SOCK_STREAM`. *protocol_factory* must be a
callable returning a :ref:`protocol <asyncio-protocol>` instance.
- This method returns a :ref:`coroutine object <coroutine>` which will try to
+ This method is a :ref:`coroutine <coroutine>` which will try to
establish the connection in the background. When successful, the
coroutine returns a ``(transport, protocol)`` pair.
@@ -274,7 +275,7 @@
:py:data:`~socket.AF_INET6` depending on *host* (or *family* if specified),
socket type :py:data:`~socket.SOCK_DGRAM`.
- This method returns a :ref:`coroutine object <coroutine>` which will try to
+ This method is a :ref:`coroutine <coroutine>` which will try to
establish the connection in the background. When successful, the
coroutine returns a ``(transport, protocol)`` pair.
@@ -288,7 +289,7 @@
family is used to communicate between processes on the same machine
efficiently.
- This method returns a :ref:`coroutine object <coroutine>` which will try to
+ This method is a :ref:`coroutine <coroutine>` which will try to
establish the connection in the background. When successful, the
coroutine returns a ``(transport, protocol)`` pair.
@@ -302,8 +303,8 @@
.. method:: BaseEventLoop.create_server(protocol_factory, host=None, port=None, \*, family=socket.AF_UNSPEC, flags=socket.AI_PASSIVE, sock=None, backlog=100, ssl=None, reuse_address=None)
- A :ref:`coroutine function <coroutine>` which creates a TCP server bound to host and
- port.
+ A :ref:`coroutine <coroutine>` method which creates a TCP server bound to
+ host and port.
The return value is a :class:`AbstractServer` object which can be used to stop
the service.
@@ -332,8 +333,6 @@
expire. If not specified will automatically be set to True on
UNIX.
- This method returns a :ref:`coroutine object <coroutine>`.
-
.. seealso::
The function :func:`start_server` creates a (:class:`StreamReader`,
@@ -380,7 +379,7 @@
representing the data received. The maximum amount of data to be received
at once is specified by *nbytes*.
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
.. seealso::
@@ -392,9 +391,9 @@
This method continues to send data from *data* until either all data has
been sent or an error occurs. ``None`` is returned on success. On error,
an exception is raised, and there is no way to determine how much data, if
- any, was successfully sent.
+ any, was successfully processed by the receiving end of the connection.
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
.. seealso::
@@ -410,7 +409,7 @@
:py:data:`~socket.AF_INET` and :py:data:`~socket.AF_INET6` address families.
Use :meth:`getaddrinfo` to resolve the hostname asynchronously.
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
.. seealso::
@@ -427,7 +426,7 @@
and *address* is the address bound to the socket on the other end of the
connection.
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
.. seealso::
@@ -440,13 +439,13 @@
.. method:: BaseEventLoop.getaddrinfo(host, port, \*, family=0, type=0, proto=0, flags=0)
- Similar to the :meth:`socket.getaddrinfo` function, but return a
- :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`, similar to
+ :meth:`socket.getaddrinfo` function but non-blocking.
.. method:: BaseEventLoop.getnameinfo(sockaddr, flags=0)
- Similar to the :meth:`socket.getnameinfo` function, but return a
- :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`, similar to
+ :meth:`socket.getnameinfo` function but non-blocking.
Running subprocesses
@@ -472,7 +471,7 @@
XXX
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
See the constructor of the :class:`subprocess.Popen` class for parameters.
@@ -480,7 +479,7 @@
XXX
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
See the constructor of the :class:`subprocess.Popen` class for parameters.
@@ -493,7 +492,7 @@
Return pair (transport, protocol), where transport support
:class:`ReadTransport` interface.
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
.. method:: BaseEventLoop.connect_write_pipe(protocol_factory, pipe)
@@ -504,7 +503,7 @@
Return pair (transport, protocol), where transport support
:class:`WriteTransport` interface.
- This method returns a :ref:`coroutine object <coroutine>`.
+ This method is a :ref:`coroutine <coroutine>`.
.. seealso::
@@ -549,6 +548,8 @@
*executor* is a :class:`~concurrent.futures.Executor` instance,
the default executor is used if *executor* is ``None``.
+ This method is a :ref:`coroutine <coroutine>`.
+
.. method:: BaseEventLoop.set_default_executor(executor)
Set the default executor used by :meth:`run_in_executor`.
@@ -633,7 +634,7 @@
.. method:: wait_closed()
- Coroutine to wait until service is closed.
+ A :ref:`coroutine <coroutine>` to wait until service is closed.
Handle
« no previous file with comments | « no previous file | Doc/library/asyncio-stream.rst » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b