Skip to content

Commit

Permalink
Merge pull request tornadoweb#1354 from ajdavis/bounded-semaphore-rel…
Browse files Browse the repository at this point in the history
…ease-docstring

Add docstring to BoundedSemaphore.release.
  • Loading branch information
bdarnell committed Feb 28, 2015
2 parents dee6ab5 + 332ff75 commit 28b7f01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tornado/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def __init__(self, value=1):
self._initial_value = value

def release(self):
"""Increment the counter and wake one waiter."""
if self._value >= self._initial_value:
raise ValueError("Semaphore released too many times")
super(BoundedSemaphore, self).release()

0 comments on commit 28b7f01

Please sign in to comment.