mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Get the shared pointers out of the scoped lock stuff. We don't need it.
This commit is contained in:
@@ -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;");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user