ILLIXR: Illinois Extended Reality Testbed
Public Member Functions | List of all members
ILLIXR::Stoplight Class Reference

Start/stop synchronization for the whole application. More...

#include <stoplight.hpp>

Public Member Functions

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 ()
 

Detailed Description

Start/stop synchronization for the whole application.

Threads should:

  1. Do intiailization actions.
  2. Wait for ready()
  3. Do their main work in a loop until should_stop().
  4. Do their shutdown actions.

The main thread should:

  1. Construct and start all plugins and construct all services.
  2. Set ready().
  3. Wait for shutdown_complete().

The stopping thread should:

  1. Someone should set should_stop().
  2. stop() and destruct each plugin and destruct each service.
  3. Set shutdown_complete().

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