mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)
This commit is contained in:
parent
2d8f06382e
commit
d757aaf9dd
9 changed files with 87 additions and 24 deletions
|
@ -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
|
||||
--------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue