summaryrefslogtreecommitdiff
path: root/tests/semaphore_test.py
diff options
context:
space:
mode:
authorRyan Williams <rdw@lindenlab.com>2010-02-20 14:29:02 -0500
committerRyan Williams <rdw@lindenlab.com>2010-02-20 14:29:02 -0500
commit46234611411f75294acce37e8f3a56b409786c40 (patch)
treeeee11d40113592afca6c59c627e909aeaa852608 /tests/semaphore_test.py
parent092b17ce9fee6aa2619ce6805fb7bb2651eda248 (diff)
downloadeventlet-46234611411f75294acce37e8f3a56b409786c40.tar.gz
Documented the hell out of semaphore, noticed that BoundedSemaphore had the wrong semantics so created a new BoundedSemaphore, renaming the old to CappedSemaphore, to correct for that.
Diffstat (limited to 'tests/semaphore_test.py')
-rw-r--r--tests/semaphore_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/semaphore_test.py b/tests/semaphore_test.py
index 131c0be..64153ed 100644
--- a/tests/semaphore_test.py
+++ b/tests/semaphore_test.py
@@ -5,7 +5,7 @@ from tests import LimitedTestCase
class TestSemaphore(LimitedTestCase):
def test_bounded(self):
- sem = semaphore.BoundedSemaphore(2, limit=3)
+ sem = semaphore.CappedSemaphore(2, limit=3)
self.assertEqual(sem.acquire(), True)
self.assertEqual(sem.acquire(), True)
gt1 = eventlet.spawn(sem.release)
@@ -21,7 +21,7 @@ class TestSemaphore(LimitedTestCase):
gt2.wait()
def test_bounded_with_zero_limit(self):
- sem = semaphore.BoundedSemaphore(0, 0)
+ sem = semaphore.CappedSemaphore(0, 0)
gt = eventlet.spawn(sem.acquire)
sem.release()
gt.wait()