![]() |
BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
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(). | |
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();
}
1.8.5