[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/nepomuk/core
From: Sebastian Trueg <sebastian () trueg ! de>
Date: 2010-11-21 19:09:01
Message-ID: 20101121190901.547C2AC8A5 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1199386 by trueg:
More mutex cleanup and optimization: we need to lock the ResourceManager whenever we \
do anything with the ResourceData hashes.
M +1 -5 resource.cpp
M +0 -2 resourcedata.cpp
M +0 -3 resourcedata.h
--- trunk/KDE/kdelibs/nepomuk/core/resource.cpp #1199385:1199386
@@ -923,7 +923,7 @@
void Nepomuk::Resource::determineFinalResourceData() const
{
- m_data->m_determineUriMutex.lock();
+ QMutexLocker lock( &m_data->rm()->mutex );
// Get an initialized ResourceData instance
ResourceData* oldData = m_data;
@@ -943,10 +943,6 @@
}
}
- // we need to unlock before assigning ourselves to make sure we do not
- // delete m_data before unlocking
- oldData->m_determineUriMutex.unlock();
-
if ( !oldData->cnt() )
delete oldData;
}
--- trunk/KDE/kdelibs/nepomuk/core/resourcedata.cpp #1199385:1199386
@@ -604,8 +604,6 @@
// Move us to the final data hash now that the URI is known
//
if( !m_uri.isEmpty() ) {
- QMutexLocker rmlock(&m_rm->mutex);
-
ResourceDataHash::iterator it = m_rm->m_initializedData.find(m_uri);
if( it == m_rm->m_initializedData.end() ) {
m_rm->m_initializedData.insert( m_uri, this );
--- trunk/KDE/kdelibs/nepomuk/core/resourcedata.h #1199385:1199386
@@ -178,9 +178,6 @@
/// This is a set since Resource::determineFinalResourceData may add \
additional uris QSet<KUrl> m_kickoffUris;
- /// Needs to be locked before calling determineUri()
- QMutex m_determineUriMutex;
-
private:
void loadType( const QUrl& type );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic