aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorCory Fields <theuni-nospam-@xbmc.org>2013-05-28 16:00:17 -0400
committerCory Fields <theuni-nospam-@xbmc.org>2013-06-04 03:53:40 -0400
commita9380c72bee0fc134a2215d7919b52936bd8158d (patch)
tree5425fb91a8917c344ddc96afec579df010c43a95 /src/init.cpp
parentc83d4d2170bf00863bd5c21c6eaea91b00390e72 (diff)
downloadbitcoin-a9380c72bee0fc134a2215d7919b52936bd8158d.tar.xz
build: prepare to move DetectShutdownThread
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp8
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)