[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.5/kdelibs/kio/kfile
From: Peter Penz <peter.penz19 () gmail ! com>
Date: 2010-07-30 16:49:03
Message-ID: 20100730164903.94112AC782 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1157302 by ppenz:
KFileMetaInfo (or one of it's used components) is not reentrant. As temporary \
workaround the access is protected by a mutex. As KFileMetaInfo internally uses \
Strigi, it generally should be checked whether it can be assumed that all Strigi \
analyzer implementations are reentrant or whether it should be assured, that at least \
only one analyzer type can be executed at one time.
M +9 -1 kloadfilemetadatathread.cpp
--- branches/KDE/4.5/kdelibs/kio/kfile/kloadfilemetadatathread.cpp #1157301:1157302
@@ -118,8 +118,14 @@
}
if (variants.isEmpty()) {
- // the file has not been indexed, query the meta data
+ // The file has not been indexed, query the meta data
// directly from the file
+
+ // TODO: KFileMetaInfo (or one of it's used components) is not \
reentrant. + // As temporary workaround the access is protected by a \
mutex. + static QMutex metaInfoMutex;
+ metaInfoMutex.lock();
+
const QString path = urls.first().toLocalFile();
KFileMetaInfo metaInfo(path, QString(), KFileMetaInfo::Fastest);
const QHash<QString, KFileMetaInfoItem> metaInfoItems = \
metaInfo.items(); @@ -128,6 +134,8 @@
const Nepomuk::Variant value(metaInfoItem.value());
data.insert(uriString, formatValue(value));
}
+
+ metaInfoMutex.unlock();
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic