5 #ifndef BITCOIN_THREADINTERRUPT_H
6 #define BITCOIN_THREADINTERRUPT_H
12 #include <condition_variable>
22 explicit operator bool()
const;
25 bool sleep_for(std::chrono::milliseconds rel_time)
27 bool sleep_for(std::chrono::seconds rel_time)
29 bool sleep_for(std::chrono::minutes rel_time)
33 std::condition_variable
cond;
A helper class for interruptible sleeps.
void operator()() EXCLUSIVE_LOCKS_REQUIRED(!mut)
bool sleep_for(std::chrono::milliseconds rel_time) EXCLUSIVE_LOCKS_REQUIRED(!mut)
std::condition_variable cond
#define EXCLUSIVE_LOCKS_REQUIRED(...)