It manages a stage and the related mutex and makes the process of locking and entering stage/unlock and exiting stage as monolithic operations.
More...
It manages a stage and the related mutex and makes the process of locking and entering stage/unlock and exiting stage as monolithic operations.
- locking and entering stage can be done in the constructor automatically.
- unlocking and exiting stage are done in the destructor automatically. So the caller just need to initialize an Stage_controller object in a proper code block. It will exit the stage automatically when the object is destroyed.