'test the return value from barrier.wait'

def test_wait_return(self):

    results = []
    def f():
        r = self.barrier.wait()
        results.append(r)
    self.run_threads(f)
    self.assertEqual(sum(results), sum(range(self.N)))
