Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/asyncio/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class Barrier(mixins._LoopBoundMixin):
def __init__(self, parties):
"""Create a barrier, initialised to 'parties' tasks."""
if parties < 1:
raise ValueError('parties must be > 0')
raise ValueError('parties must be >= 1')

self._cond = Condition() # notify all tasks when state changes

Expand Down
2 changes: 1 addition & 1 deletion Lib/threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def __init__(self, parties, action=None, timeout=None):

"""
if parties < 1:
raise ValueError("parties must be > 0")
raise ValueError("parties must be >= 1")
self._cond = Condition(Lock())
self._action = action
self._timeout = timeout
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated ValueError message for asyncio and threading Barrier.
Loading