issue 8777

Add threading.Barrier
This commit is contained in:
Kristján Valur Jónsson 2010-10-28 09:43:10 +00:00
parent 65ffae0aa3
commit 3be00037d6
4 changed files with 469 additions and 0 deletions

View file

@ -555,6 +555,8 @@ class SemaphoreTests(lock_tests.SemaphoreTests):
class BoundedSemaphoreTests(lock_tests.BoundedSemaphoreTests):
semtype = staticmethod(threading.BoundedSemaphore)
class BarrierTests(lock_tests.BarrierTests):
barriertype = staticmethod(threading.Barrier)
def test_main():
test.support.run_unittest(LockTests, PyRLockTests, CRLockTests, EventTests,
@ -563,6 +565,7 @@ def test_main():
ThreadTests,
ThreadJoinOnShutdown,
ThreadingExceptionTests,
BarrierTests
)
if __name__ == "__main__":