Esempio n. 1
0
void boss(){
    count.wait();
    printf("workers complete their works, now I need to check!\n");
}
void testWaitFuncTrue(CountDownLatch& latch) {
  EXPECT_TRUE(latch.wait(1, std::chrono::seconds(2)));
}
void testWaitFuncFalse(CountDownLatch& latch) {
  EXPECT_FALSE(latch.wait(1, std::chrono::seconds(1)));
}
void testWaitFunc(CountDownLatch& latch) { latch.wait(); }