Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2cef3001
Commit
2cef3001
authored
Oct 23, 2014
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio doc: fix typo in an example
parent
a9421fb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-eventloop.rst
+6
-4
No files found.
Doc/library/asyncio-eventloop.rst
View file @
2cef3001
...
...
@@ -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
registe
r
# We are done: unregister the
file descripto
r
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.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment