aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2018-02-07 19:19:34 -0500
committerCory Fields <cory-nospam-@coryfields.com>2018-02-08 14:35:29 -0500
commit004f9999464c7ef4a57b281dcbb407e5d193e798 (patch)
tree2fd9df9f73784808f615402cc1a182f53f3f6abd /src
parent08272671d2218eb69589a0639cbb61ef7cde3004 (diff)
downloadbitcoin-004f9999464c7ef4a57b281dcbb407e5d193e798.tar.xz
boost: drop boost threads for [alert|block|wallet]notify
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp3
-rw-r--r--src/validation.cpp3
-rw-r--r--src/wallet/wallet.cpp4
3 files changed, 6 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 9f61989a26..ec2edd9cac 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -546,7 +546,8 @@ static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex
std::string strCmd = gArgs.GetArg("-blocknotify", "");
if (!strCmd.empty()) {
boost::replace_all(strCmd, "%s", pBlockIndex->GetBlockHash().GetHex());
- boost::thread t(runCommand, strCmd); // thread runs free
+ std::thread t(runCommand, strCmd);
+ t.detach(); // thread runs free
}
}
diff --git a/src/validation.cpp b/src/validation.cpp
index 16b656c7f5..6b02c0920c 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1188,7 +1188,8 @@ static void AlertNotify(const std::string& strMessage)
safeStatus = singleQuote+safeStatus+singleQuote;
boost::replace_all(strCmd, "%s", safeStatus);
- boost::thread t(runCommand, strCmd); // thread runs free
+ std::thread t(runCommand, strCmd);
+ t.detach(); // thread runs free
}
static void CheckForkWarningConditions()
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 2b8019395c..3b8ecce6da 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -34,7 +34,6 @@
#include <future>
#include <boost/algorithm/string/replace.hpp>
-#include <boost/thread.hpp>
std::vector<CWalletRef> vpwallets;
/** Transaction fee set by the user */
@@ -976,7 +975,8 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
if (!strCmd.empty())
{
boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
- boost::thread t(runCommand, strCmd); // thread runs free
+ std::thread t(runCommand, strCmd);
+ t.detach(); // thread runs free
}
return true;