Cleanup thread creation.

This commit is contained in:
JoelKatz
2012-12-21 12:10:26 -08:00
parent d34c0e6a45
commit 34456b019c
4 changed files with 5 additions and 10 deletions

View File

@@ -1167,9 +1167,8 @@ void Ledger::pendSave(bool fromConsensus)
if (!fromConsensus && !theApp->isNewFlag(getHash(), SF_SAVED))
return;
boost::thread thread(boost::bind(&Ledger::saveAcceptedLedger, shared_from_this(),
fromConsensus, theApp->getJobQueue().getLoadEvent(jtDISK)));
thread.detach();
boost::thread(boost::bind(&Ledger::saveAcceptedLedger, shared_from_this(),
fromConsensus, theApp->getJobQueue().getLoadEvent(jtDISK))).detach();
boost::recursive_mutex::scoped_lock sl(sPendingSaveLock);
++sPendingSaves;