aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 2c47f30e92..a805e350e6 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -11,6 +11,7 @@
#include "guiutil.h"
#include "guiconstants.h"
#include "init.h"
+#include "util.h"
#include "ui_interface.h"
#include "paymentserver.h"
@@ -215,9 +216,10 @@ int main(int argc, char *argv[])
if (GUIUtil::GetStartOnSystemStartup())
GUIUtil::SetStartOnSystemStartup(true);
+ boost::thread_group threadGroup;
BitcoinGUI window;
guiref = &window;
- if(AppInit2())
+ if(AppInit2(threadGroup))
{
{
// Put this in a block, so that the Model objects are cleaned up before
@@ -259,6 +261,8 @@ int main(int argc, char *argv[])
}
// Shutdown the core and its threads, but don't exit Bitcoin-Qt here
Shutdown(NULL);
+ threadGroup.interrupt_all();
+ threadGroup.join_all();
}
else
{