12 CThreadInterrupt::operator bool()
const 14 return flag.load(std::memory_order_acquire);
19 flag.store(
false, std::memory_order_release);
26 flag.store(
true, std::memory_order_release);
34 return !
cond.wait_for(lock, rel_time, [
this]() {
return flag.load(std::memory_order_acquire); });
39 return sleep_for(std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
44 return sleep_for(std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
bool sleep_for(std::chrono::milliseconds rel_time)
std::condition_variable cond
#define WAIT_LOCK(cs, name)