summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 2dcdd0c..94ea2f0 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -689,6 +689,8 @@ class Barrier:
default for all subsequent 'wait()' calls.
"""
+ if parties < 1:
+ raise ValueError("parties must be > 0")
self._cond = Condition(Lock())
self._action = action
self._timeout = timeout