mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +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
|
@ -44,6 +44,10 @@ class BaseTransport:
|
|||
class ReadTransport(BaseTransport):
|
||||
"""Interface for read-only transports."""
|
||||
|
||||
def is_reading(self):
|
||||
"""Return True if the transport is receiving."""
|
||||
raise NotImplementedError
|
||||
|
||||
def pause_reading(self):
|
||||
"""Pause the receiving end.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue