summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/exceptions.py
diff options
context:
space:
mode:
authorDuprat <yduprat@gmail.com>2022-03-25 22:01:21 (GMT)
committerGitHub <noreply@github.com>2022-03-25 22:01:21 (GMT)
commitd03acd7270d66ddb8e987f9743405147ecc15087 (patch)
treecffe25f0c26d55aef28c910dcf825747da99a6d4 /Lib/asyncio/exceptions.py
parent20e6e5636a06fe5e1472062918d0a302d82a71c3 (diff)
downloadcpython-d03acd7270d66ddb8e987f9743405147ecc15087.zip
cpython-d03acd7270d66ddb8e987f9743405147ecc15087.tar.gz
cpython-d03acd7270d66ddb8e987f9743405147ecc15087.tar.bz2
bpo-43352: Add a Barrier object in asyncio lib (GH-24903)
Co-authored-by: Yury Selivanov <yury@edgedb.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Diffstat (limited to 'Lib/asyncio/exceptions.py')
-rw-r--r--Lib/asyncio/exceptions.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/asyncio/exceptions.py b/Lib/asyncio/exceptions.py
index c764c9f..5ece595 100644
--- a/Lib/asyncio/exceptions.py
+++ b/Lib/asyncio/exceptions.py
@@ -1,7 +1,8 @@
"""asyncio exceptions."""
-__all__ = ('CancelledError', 'InvalidStateError', 'TimeoutError',
+__all__ = ('BrokenBarrierError',
+ 'CancelledError', 'InvalidStateError', 'TimeoutError',
'IncompleteReadError', 'LimitOverrunError',
'SendfileNotAvailableError')
@@ -55,3 +56,7 @@ class LimitOverrunError(Exception):
def __reduce__(self):
return type(self), (self.args[0], self.consumed)
+
+
+class BrokenBarrierError(RuntimeError):
+ """Barrier is broken by barrier.abort() call."""