summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/transports.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-18 22:03:23 (GMT)
committerGitHub <noreply@github.com>2017-12-18 22:03:23 (GMT)
commitd757aaf9dd767d13205bf9917e520ebf43e7f6e5 (patch)
tree2e0c92b2daf71cdf63c68a392e49aaa0a730daf7 /Lib/asyncio/transports.py
parent2d8f06382e7d5a759ca554110a699a397114824a (diff)
downloadcpython-d757aaf9dd767d13205bf9917e520ebf43e7f6e5.zip
cpython-d757aaf9dd767d13205bf9917e520ebf43e7f6e5.tar.gz
cpython-d757aaf9dd767d13205bf9917e520ebf43e7f6e5.tar.bz2
bpo-32356: idempotent pause_/resume_reading; new is_reading method. (#4914)
Diffstat (limited to 'Lib/asyncio/transports.py')
-rw-r--r--Lib/asyncio/transports.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/transports.py b/Lib/asyncio/transports.py
index 51f5673..233bbb5 100644
--- a/Lib/asyncio/transports.py
+++ b/Lib/asyncio/transports.py
@@ -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.