30 #ifndef INCLUDED_RunLoopManagerBoost_h_GUID_50f7b2f1_493e_4395_25ca_df2f010a34bd 31 #define INCLUDED_RunLoopManagerBoost_h_GUID_50f7b2f1_493e_4395_25ca_df2f010a34bd 37 #include <boost/thread.hpp> 56 void signalShutdown();
61 void reportStateChange_(RunningState s);
63 boost::condition_variable stateCond_;
65 typedef boost::unique_lock<boost::mutex> Lock;
68 volatile RunningState currentState_;
71 inline void RunLoopManagerBoost::signalStart() {
80 while (currentState_ != STATE_RUNNING) {
81 stateCond_.wait(condGuard);
86 inline void RunLoopManagerBoost::signalShutdown() {
95 while (currentState_ != STATE_STOPPED) {
96 stateCond_.wait(condGuard);
101 RunLoopManagerBoost::reportStateChange_(RunLoopManagerBase::RunningState s) {
103 Lock condGuard(mut_);
106 stateCond_.notify_all();
111 #endif // INCLUDED_RunLoopManagerBoost_h_GUID_50f7b2f1_493e_4395_25ca_df2f010a34bd Definition: RunLoopManager.h:42
Base class for implementations of a RunLoopManager that use various synchronization libraries...
Definition: RunLoopManager.h:65
void signalAndWaitForShutdown()
Send a message to the run loop that it should stop, and wait until it does.
Definition: RunLoopManagerBoost.h:91
void signalAndWaitForStart()
Set up for run loop to start, then block until we have confirmation that the run loop is running...
Definition: RunLoopManagerBoost.h:76
void setShouldStop_(bool value)
internal utility function.
Definition: RunLoopManager.h:143
Definition: RunLoopManagerBoost.h:44