[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (asyncio doc)
victor.stinner
python-checkins at python.org
Thu Oct 23 22:39:22 CEST 2014
https://hg.python.org/cpython/rev/ee5f9615c8a7
changeset: 93162:ee5f9615c8a7
parent: 93160:d70b70a661c6
parent: 93161:2e69ef48601c
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Oct 23 22:39:11 2014 +0200
summary:
Merge 3.4 (asyncio doc)
files:
Doc/library/asyncio-eventloop.rst | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -465,8 +465,8 @@
Register write pipe in eventloop.
*protocol_factory* should instantiate object with :class:`BaseProtocol`
- interface. *pipe* is file-like object.
- Return pair (transport, protocol), where *transport* supports
+ interface. *pipe* is :term:`file-like object <file object>`.
+ Return pair ``(transport, protocol)``, where *transport* supports
:class:`WriteTransport` interface.
With :class:`SelectorEventLoop` event loop, the *pipe* is set to
@@ -734,12 +734,12 @@
def reader():
data = rsock.recv(100)
print("Received:", data.decode())
- # We are done: unregister the register
+ # We are done: unregister the file descriptor
loop.remove_reader(rsock)
# Stop the event loop
loop.stop()
- # Wait for read event
+ # Register the file descriptor for read event
loop.add_reader(rsock, reader)
# Simulate the reception of data from the network
@@ -790,3 +790,5 @@
loop.run_forever()
finally:
loop.close()
+
+This example only works on UNIX.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list