summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-eventloop.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-10-23 20:38:46 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-10-23 20:38:46 (GMT)
commit2cef3001870bdfdf8ef58ca82f629536c899d188 (patch)
treea80508b50811e86f4601c52d8b6232940d4d0525 /Doc/library/asyncio-eventloop.rst
parenta9421fb3a3013a8aacc18959c28c1b0002f34025 (diff)
downloadcpython-2cef3001870bdfdf8ef58ca82f629536c899d188.zip
cpython-2cef3001870bdfdf8ef58ca82f629536c899d188.tar.gz
cpython-2cef3001870bdfdf8ef58ca82f629536c899d188.tar.bz2
asyncio doc: fix typo in an example
Diffstat (limited to 'Doc/library/asyncio-eventloop.rst')
-rw-r--r--Doc/library/asyncio-eventloop.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 072d001..ec88475 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -465,8 +465,8 @@ Use :class:`ProactorEventLoop` to support pipes on Windows.
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 @@ Wait until a file descriptor received some data using the
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 @@ the :meth:`BaseEventLoop.add_signal_handler` method::
loop.run_forever()
finally:
loop.close()
+
+This example only works on UNIX.