mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 20:42:59 +01:00
boost: drop boost threads for [alert|block|wallet]notify
This commit is contained in:
parent
08272671d2
commit
004f999946
@ -546,7 +546,8 @@ static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex
|
|||||||
std::string strCmd = gArgs.GetArg("-blocknotify", "");
|
std::string strCmd = gArgs.GetArg("-blocknotify", "");
|
||||||
if (!strCmd.empty()) {
|
if (!strCmd.empty()) {
|
||||||
boost::replace_all(strCmd, "%s", pBlockIndex->GetBlockHash().GetHex());
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1188,7 +1188,8 @@ static void AlertNotify(const std::string& strMessage)
|
|||||||
safeStatus = singleQuote+safeStatus+singleQuote;
|
safeStatus = singleQuote+safeStatus+singleQuote;
|
||||||
boost::replace_all(strCmd, "%s", safeStatus);
|
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()
|
static void CheckForkWarningConditions()
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#include <future>
|
#include <future>
|
||||||
|
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
#include <boost/thread.hpp>
|
|
||||||
|
|
||||||
std::vector<CWalletRef> vpwallets;
|
std::vector<CWalletRef> vpwallets;
|
||||||
/** Transaction fee set by the user */
|
/** Transaction fee set by the user */
|
||||||
@ -976,7 +975,8 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose)
|
|||||||
if (!strCmd.empty())
|
if (!strCmd.empty())
|
||||||
{
|
{
|
||||||
boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
|
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;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user