diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-08-25 15:04:12 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-08-25 15:04:12 (GMT) |
commit | d71dcbb043578c0abe770a2f37fac36e1a402821 (patch) | |
tree | 904d633e91d2dcf19c91d03e1bb6ac39e2635433 /Doc/library/asyncio-stream.rst | |
parent | 8e16351545947fa1d083f8ea02b7b89415f71bc6 (diff) | |
download | cpython-d71dcbb043578c0abe770a2f37fac36e1a402821.zip cpython-d71dcbb043578c0abe770a2f37fac36e1a402821.tar.gz cpython-d71dcbb043578c0abe770a2f37fac36e1a402821.tar.bz2 |
asyncio: update the doc
* dev: mention that the logging must be configured at DEBUG level
* streams: drain() has no more a strange return value, it's just
a standard coroutine
Diffstat (limited to 'Doc/library/asyncio-stream.rst')
-rw-r--r-- | Doc/library/asyncio-stream.rst | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst index 11d13c8..a4a997e 100644 --- a/Doc/library/asyncio-stream.rst +++ b/Doc/library/asyncio-stream.rst @@ -172,17 +172,16 @@ StreamWriter Wait until the write buffer of the underlying transport is flushed. - This method has an unusual return value. The intended use is to write:: + The intended use is to write:: w.write(data) yield from w.drain() - When there's nothing to wait for, :meth:`drain()` returns ``()``, and the - yield-from continues immediately. When the transport buffer is full (the - protocol is paused), :meth:`drain` creates and returns a - :class:`Future` and the yield-from will block until - that Future is completed, which will happen when the buffer is - (partially) drained and the protocol is resumed. + When the transport buffer is full (the protocol is paused), block until + the buffer is (partially) drained and the protocol is resumed. When there + is nothing to wait for, the yield-from continues immediately. + + This method is a :ref:`coroutine <coroutine>`. .. method:: get_extra_info(name, default=None) |