diff options
author | Cory Fields <theuni-nospam-@xbmc.org> | 2013-05-28 16:00:17 -0400 |
---|---|---|
committer | Cory Fields <theuni-nospam-@xbmc.org> | 2013-06-04 03:53:40 -0400 |
commit | a9380c72bee0fc134a2215d7919b52936bd8158d (patch) | |
tree | 5425fb91a8917c344ddc96afec579df010c43a95 /src/init.cpp | |
parent | c83d4d2170bf00863bd5c21c6eaea91b00390e72 (diff) |
build: prepare to move DetectShutdownThread
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index 78f838f7cb..6777f48d57 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -123,13 +123,15 @@ void Shutdown() // void DetectShutdownThread(boost::thread_group* threadGroup) { + bool shutdown = ShutdownRequested(); // Tell the main threads to shutdown. - while (!fRequestShutdown) + while (!shutdown) { MilliSleep(200); - if (fRequestShutdown) - threadGroup->interrupt_all(); + shutdown = ShutdownRequested(); } + if (threadGroup) + threadGroup->interrupt_all(); } void HandleSIGTERM(int) |