Get the shared pointers out of the scoped lock stuff. We don't need it.

This commit is contained in:
JoelKatz
2012-11-28 15:27:20 -08:00
parent 725761d60e
commit 6aca65ff76
8 changed files with 14 additions and 12 deletions

View File

@@ -53,7 +53,7 @@ bool HashedObjectStore::store(HashedObjectType type, uint32 index,
void HashedObjectStore::waitWrite()
{
boost::unique_lock<boost::mutex> sl(mWriteMutex);
boost::mutex::scoped_lock sl(mWriteMutex);
while (mWritePending)
mWriteCondition.wait(sl);
}
@@ -67,7 +67,7 @@ void HashedObjectStore::bulkWrite()
set.reserve(128);
{
boost::unique_lock<boost::mutex> sl(mWriteMutex);
boost::mutex::scoped_lock sl(mWriteMutex);
mWriteSet.swap(set);
assert(mWriteSet.empty());
if (set.empty())
@@ -85,7 +85,7 @@ void HashedObjectStore::bulkWrite()
Database* db = theApp->getHashNodeDB()->getDB();
{
ScopedLock sl = theApp->getHashNodeDB()->getDBLock();
ScopedLock sl( theApp->getHashNodeDB()->getDBLock());
db->executeSQL("BEGIN TRANSACTION;");