15 : thread_(), condvar_(), ready_(false), stopping_(false),
22 std::lock_guard<std::mutex> lock(
mutex_);
45 std::unique_lock<std::mutex> lock(
mutex_);
68 std::lock_guard<std::mutex> lock(
mutex_);
bool stopped_
Flag indicating that the thread is stopped.
void waitReady()
Wait for the thread to be ready.
void doWait(bool &flag)
Wait for a selected flag to be set.
bool stopping_
Flag indicating that the thread is stopping.
void waitStopping()
Wait for the thread to be stopping.
void doSignal(bool &flag)
Sets selected flag to true and signals condition variable.
ThreadedTest()
Constructor.
void waitStopped()
Wait for the thread to stop.
void signalReady()
Signal that thread is ready.
std::condition_variable condvar_
Conditional variable for thread waits.
std::mutex mutex_
Mutex used to synchronize threads.
bool ready_
Flag indicating that the thread is ready.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void signalStopped()
Signal that thread is stopped.
void signalStopping()
Signal that thread is stopping.
bool isStopping()
Checks if the thread is stopping.