예제 #1
0
파일: main.cpp 프로젝트: zhoudayang/wheel
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(); }