do {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
- } while(!p.isQueueEmpty() && !p.isAllThreadsWaiting());
+ } while(!p.isQueueEmpty() || !p.isAllThreadsWaiting());
ASSERT_EQ(data.load(), 1);
do {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
- } while(!p.isQueueEmpty() && !p.isAllThreadsWaiting());
+ } while(!p.isQueueEmpty() || !p.isAllThreadsWaiting());
ASSERT_EQ(data.load(), 11);
}
do {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
- } while(!p.isQueueEmpty() && !p.isAllThreadsWaiting());
+ } while(!p.isQueueEmpty() || !p.isAllThreadsWaiting());
ASSERT_EQ(data.load(), 1);
do {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
- } while(!p.isQueueEmpty() && !p.isAllThreadsWaiting());
+ } while(!p.isQueueEmpty() || !p.isAllThreadsWaiting());
ASSERT_EQ(data.load(), 11);
}