File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -465,8 +465,8 @@ Use :class:`ProactorEventLoop` to support pipes on Windows.
465
465
Register write pipe in eventloop.
466
466
467
467
*protocol_factory * should instantiate object with :class: `BaseProtocol `
468
- interface. *pipe * is file-like object.
469
- Return pair (transport, protocol), where *transport * supports
468
+ interface. *pipe * is :term: ` file-like object <file object> ` .
469
+ Return pair `` (transport, protocol) `` , where *transport * supports
470
470
:class: `WriteTransport ` interface.
471
471
472
472
With :class: `SelectorEventLoop ` event loop, the *pipe * is set to
@@ -734,12 +734,12 @@ Wait until a file descriptor received some data using the
734
734
def reader():
735
735
data = rsock.recv(100)
736
736
print("Received:", data.decode())
737
- # We are done: unregister the register
737
+ # We are done: unregister the file descriptor
738
738
loop.remove_reader(rsock)
739
739
# Stop the event loop
740
740
loop.stop()
741
741
742
- # Wait for read event
742
+ # Register the file descriptor for read event
743
743
loop.add_reader(rsock, reader)
744
744
745
745
# Simulate the reception of data from the network
@@ -790,3 +790,5 @@ the :meth:`BaseEventLoop.add_signal_handler` method::
790
790
loop.run_forever()
791
791
finally:
792
792
loop.close()
793
+
794
+ This example only works on UNIX.
You can’t perform that action at this time.
0 commit comments