mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 22:15:52 +00:00
Cleanup thread creation.
This commit is contained in:
@@ -103,9 +103,7 @@ void Application::run()
|
|||||||
LogPartition::setSeverity(lsDEBUG);
|
LogPartition::setSeverity(lsDEBUG);
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::thread auxThread(boost::bind(&boost::asio::io_service::run, &mAuxService));
|
boost::thread(boost::bind(&boost::asio::io_service::run, &mAuxService)).detach();
|
||||||
auxThread.detach();
|
|
||||||
|
|
||||||
|
|
||||||
if (!theConfig.RUN_STANDALONE)
|
if (!theConfig.RUN_STANDALONE)
|
||||||
mSNTPClient.init(theConfig.SNTP_SERVERS);
|
mSNTPClient.init(theConfig.SNTP_SERVERS);
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ bool HashedObjectStore::store(HashedObjectType type, uint32 index,
|
|||||||
if (!mWritePending)
|
if (!mWritePending)
|
||||||
{
|
{
|
||||||
mWritePending = true;
|
mWritePending = true;
|
||||||
boost::thread t(boost::bind(&HashedObjectStore::bulkWrite, this));
|
boost::thread(boost::bind(&HashedObjectStore::bulkWrite, this)).detach();
|
||||||
t.detach();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
|
|||||||
@@ -204,8 +204,7 @@ void JobQueue::setThreadCount(int c)
|
|||||||
while (mThreadCount < c)
|
while (mThreadCount < c)
|
||||||
{
|
{
|
||||||
++mThreadCount;
|
++mThreadCount;
|
||||||
boost::thread t(boost::bind(&JobQueue::threadEntry, this));
|
boost::thread(boost::bind(&JobQueue::threadEntry, this)).detach();
|
||||||
t.detach();
|
|
||||||
}
|
}
|
||||||
while (mThreadCount > c)
|
while (mThreadCount > c)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1167,9 +1167,8 @@ void Ledger::pendSave(bool fromConsensus)
|
|||||||
if (!fromConsensus && !theApp->isNewFlag(getHash(), SF_SAVED))
|
if (!fromConsensus && !theApp->isNewFlag(getHash(), SF_SAVED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
boost::thread thread(boost::bind(&Ledger::saveAcceptedLedger, shared_from_this(),
|
boost::thread(boost::bind(&Ledger::saveAcceptedLedger, shared_from_this(),
|
||||||
fromConsensus, theApp->getJobQueue().getLoadEvent(jtDISK)));
|
fromConsensus, theApp->getJobQueue().getLoadEvent(jtDISK))).detach();
|
||||||
thread.detach();
|
|
||||||
|
|
||||||
boost::recursive_mutex::scoped_lock sl(sPendingSaveLock);
|
boost::recursive_mutex::scoped_lock sl(sPendingSaveLock);
|
||||||
++sPendingSaves;
|
++sPendingSaves;
|
||||||
|
|||||||
Reference in New Issue
Block a user