10#include <boost/shared_ptr.hpp>
11#include <gtest/gtest.h>
14#include <condition_variable>
Base class for tests requiring threads.
void doWait(bool &flag)
Wait for a selected flag to be set.
void doSignal(bool &flag)
Sets selected flag to true and signals condition variable.
boost::shared_ptr< std::thread > thread_
Pointer to server thread.
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.
void waitStopped()
Wait for the thread to stop.
bool stopped_
Flag indicating that the thread is stopped.
ThreadedTest()
Constructor.
void waitStopping()
Wait for the thread to be stopping.
void signalStopped()
Signal that thread is stopped.
bool stopping_
Flag indicating that the thread is stopping.
bool isStopping()
Checks if the thread is stopping.
void waitReady()
Wait for the thread to be ready.
void signalStopping()
Signal that thread is stopping.
void signalReady()
Signal that thread is ready.
Defines the logger used by the top-level component of kea-lfc.