10CThreadInterrupt::operator bool()
const {
11 return flag.load(std::memory_order_acquire);
15 flag.store(
false, std::memory_order_release);
21 flag.store(
true, std::memory_order_release);
28 return !
cond.wait_for(lock, rel_time, [
this]() {
29 return flag.load(std::memory_order_acquire);
35 std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
40 std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
void operator()() EXCLUSIVE_LOCKS_REQUIRED(!mut)
bool sleep_for(std::chrono::milliseconds rel_time) EXCLUSIVE_LOCKS_REQUIRED(!mut)
std::condition_variable cond
#define WAIT_LOCK(cs, name)