diff options
author | Yury Selivanov <yury@magic.io> | 2017-12-18 22:03:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-18 22:03:23 (GMT) |
commit | d757aaf9dd767d13205bf9917e520ebf43e7f6e5 (patch) | |
tree | 2e0c92b2daf71cdf63c68a392e49aaa0a730daf7 /Doc/library | |
parent | 2d8f06382e7d5a759ca554110a699a397114824a (diff) | |
download | cpython-d757aaf9dd767d13205bf9917e520ebf43e7f6e5.zip cpython-d757aaf9dd767d13205bf9917e520ebf43e7f6e5.tar.gz cpython-d757aaf9dd767d13205bf9917e520ebf43e7f6e5.tar.bz2 |
bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-protocol.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index a4b0d59..3aa1f2f 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -118,17 +118,31 @@ ReadTransport Interface for read-only transports. + .. method:: is_reading() + + Return ``True`` if the transport is receiving new data. + + .. versionadded:: 3.7 + .. method:: pause_reading() Pause the receiving end of the transport. No data will be passed to the protocol's :meth:`data_received` method until :meth:`resume_reading` is called. + .. versionchanged:: 3.7 + The method is idempotent, i.e. it can be called when the + transport is already paused or closed. + .. method:: resume_reading() Resume the receiving end. The protocol's :meth:`data_received` method will be called once again if some data is available for reading. + .. versionchanged:: 3.7 + The method is idempotent, i.e. it can be called when the + transport is already reading. + WriteTransport -------------- |