shutdown_state.h 385 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include "misc/atomic_box.h"
  3. #include <util/system/event.h>
  4. enum EShutdownState {
  5. SS_RUNNING,
  6. SS_SHUTDOWN_COMMAND,
  7. SS_SHUTDOWN_COMPLETE,
  8. };
  9. struct TAtomicShutdownState {
  10. TAtomicBox<EShutdownState> State;
  11. TSystemEvent ShutdownComplete;
  12. void ShutdownCommand();
  13. void CompleteShutdown();
  14. bool IsRunning();
  15. ~TAtomicShutdownState();
  16. };