BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions
BeeeOn::StopControl::Run Class Reference

Helper class for managing a common stoppable loop situation: More...

#include <StopControl.h>

Public Member Functions

 Run (StopControl &control)
 
bool waitStoppable (const Poco::Timespan &timeout)
 Delegates to StopControl::waitStoppable().
 
 operator bool () const
 Equivalent to !StopControl::shouldStop().
 

Detailed Description

Helper class for managing a common stoppable loop situation:

void run()
{
   StopControl::Run run(m_stopControl);
   while (run) {
      ...
      run.waitStoppable(...)
      ...
   }
}
void stop()
{
   m_stopControl.requestStop();
}

The documentation for this class was generated from the following files: