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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user