'Test wait(timeout)'

def test_timeout(self):

    def f():
        i = self.barrier.wait()
        if (i == (self.N // 2)):
            time.sleep(1.0)
        self.assertRaises(threading.BrokenBarrierError, self.barrier.wait, 0.5)
    self.run_threads(f)
