diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:08:17 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:08:17 +0100 |
commit | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (patch) | |
tree | fb4a5c18886537b4b7df46ed3b2aa579747ff507 /Doc/library/asynchat.rst | |
parent | 5e0114a832a903518c4af6983161c0c2a8942a24 (diff) | |
parent | 819a21a3a4aac38f32e1ba4f68bcef45591fa3f0 (diff) | |
download | cpython-c6180bb73c8c7c7f9d8ea9816487b710597b6fc1.tar.gz |
Merge issue #26355 fix from Python 3.5
Diffstat (limited to 'Doc/library/asynchat.rst')
-rw-r--r-- | Doc/library/asynchat.rst | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst index ae72d26122..9e51416b83 100644 --- a/Doc/library/asynchat.rst +++ b/Doc/library/asynchat.rst @@ -9,6 +9,9 @@ **Source code:** :source:`Lib/asynchat.py` +.. deprecated:: 3.6 + Please use :mod:`asyncio` instead. + -------------- .. note:: @@ -58,13 +61,13 @@ connection requests. The asynchronous output buffer size (default ``4096``). Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to - define a first-in-first-out queue (fifo) of *producers*. A producer need + define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer need have only one method, :meth:`more`, which should return data to be transmitted on the channel. The producer indicates exhaustion (*i.e.* that it contains no more data) by having its :meth:`more` method return the empty bytes object. At this point - the :class:`async_chat` object removes the producer from the fifo and starts - using the next producer, if any. When the producer fifo is empty the + the :class:`async_chat` object removes the producer from the queue and starts + using the next producer, if any. When the producer queue is empty the :meth:`handle_write` method does nothing. You use the channel object's :meth:`set_terminator` method to describe how to recognize the end of, or an important breakpoint in, an incoming transmission from the remote @@ -78,8 +81,8 @@ connection requests. .. method:: async_chat.close_when_done() - Pushes a ``None`` on to the producer fifo. When this producer is popped off - the fifo it causes the channel to be closed. + Pushes a ``None`` on to the producer queue. When this producer is popped off + the queue it causes the channel to be closed. .. method:: async_chat.collect_incoming_data(data) @@ -92,7 +95,7 @@ connection requests. .. method:: async_chat.discard_buffers() In emergencies this method will discard any data held in the input and/or - output buffers and the producer fifo. + output buffers and the producer queue. .. method:: async_chat.found_terminator() @@ -110,7 +113,7 @@ connection requests. .. method:: async_chat.push(data) - Pushes data on to the channel's fifo to ensure its transmission. + Pushes data on to the channel's queue to ensure its transmission. This is all you need to do to have the channel write the data out to the network, although it is possible to use your own producers in more complex schemes to implement encryption and chunking, for example. @@ -118,7 +121,7 @@ connection requests. .. method:: async_chat.push_with_producer(producer) - Takes a producer object and adds it to the producer fifo associated with + Takes a producer object and adds it to the producer queue associated with the channel. When all currently-pushed producers have been exhausted the channel will consume this producer's data by calling its :meth:`more` method and send the data to the remote endpoint. |