Solving issue 1684: "thumbnail.cc uses Glib::Mutex recusively" ; this changeset introduce a new MyMutex and MyMutex::MyLock class that has to be used instead of Glib ones

This commit is contained in:
Hombre
2013-08-11 23:33:10 +02:00
parent 987e4dcd89
commit f512d74323
55 changed files with 1037 additions and 751 deletions

View File

@@ -629,8 +629,8 @@ LCPStore* LCPStore::getInstance()
static LCPStore* instance_ = 0;
if ( instance_ == 0 )
{
static Glib::Mutex smutex_;
Glib::Mutex::Lock lock(smutex_);
static MyMutex smutex_;
MyMutex::MyLock lock(smutex_);
if ( instance_ == 0 )
{
instance_ = new LCPStore();
@@ -642,7 +642,7 @@ LCPStore* LCPStore::getInstance()
LCPProfile* LCPStore::getProfile (Glib::ustring filename) {
if (filename.length()==0 || !isValidLCPFileName(filename)) return NULL;
Glib::Mutex::Lock lock(mtx);
MyMutex::MyLock lock(mtx);
std::map<Glib::ustring, LCPProfile*>::iterator r = profileCache.find (filename);
if (r!=profileCache.end()) return r->second;
@@ -676,4 +676,4 @@ Glib::ustring LCPStore::getDefaultCommonDirectory() const {
// TODO: Add Mac paths here
return dir;
}
}