From 4315a113935902bbbb82047e3f43695b4d76fff2 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 17 Jun 2015 15:38:00 +0100 Subject: Fixed and improved restarting Restarts are now an actual, close-as-possible to application exit+reopen. --- src/Root.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index b29fe0a5e..772d858d9 100644 --- a/src/Root.h +++ b/src/Root.h @@ -7,6 +7,7 @@ #include "Defines.h" #include "RankManager.h" #include +#include @@ -48,13 +49,12 @@ public: static bool m_TerminateEventRaised; static bool m_RunAsService; - static bool m_ShouldStop; cRoot(void); ~cRoot(); - void Start(std::unique_ptr overridesRepo); + void Start(std::unique_ptr a_OverridesRepo); // tolua_begin cServer * GetServer(void) { return m_Server; } @@ -200,6 +200,8 @@ private: cCommandQueue m_PendingCommands; std::thread m_InputThread; + cEvent m_StopEvent; + std::atomic_flag m_InputThreadRunFlag; cServer * m_Server; cMonsterConfig * m_MonsterConfig; @@ -213,9 +215,7 @@ private: std::unique_ptr m_RankManager; - cHTTPServer m_HTTPServer; - - bool m_bRestart; + cHTTPServer m_HTTPServer; void LoadGlobalSettings(); -- cgit v1.2.3