9 CThreadInterrupt::operator bool()
const 11 return flag.load(std::memory_order_acquire);
16 flag.store(
false, std::memory_order_release);
22 std::unique_lock<std::mutex> lock(
mut);
23 flag.store(
true, std::memory_order_release);
30 std::unique_lock<std::mutex> lock(
mut);
31 return !
cond.wait_for(lock, rel_time, [
this]() {
return flag.load(std::memory_order_acquire); });
36 return sleep_for(std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
41 return sleep_for(std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
bool sleep_for(std::chrono::milliseconds rel_time)
std::condition_variable cond