Start/stop synchronization for the whole application.
More...
#include <stoplight.hpp>
|
void | wait_for_ready () const |
|
void | signal_ready () |
|
bool | check_should_stop () const |
|
void | signal_should_stop () |
|
void | wait_for_shutdown_complete () const |
|
bool | check_shutdown_complete () const |
|
void | signal_shutdown_complete () |
|
Start/stop synchronization for the whole application.
Threads should:
- Do intiailization actions.
- Wait for ready()
- Do their main work in a loop until should_stop().
- Do their shutdown actions.
The main thread should:
- Construct and start all plugins and construct all services.
- Set ready().
- Wait for shutdown_complete().
The stopping thread should:
- Someone should set should_stop().
- stop() and destruct each plugin and destruct each service.
- Set shutdown_complete().
The documentation for this class was generated from the following file: