Commit 585e71d9 authored by Gus Grubba's avatar Gus Grubba

Don't bother testing the reason for exiting the wait condition. If there is...

Don't bother testing the reason for exiting the wait condition. If there is nothing to do, it will exit any way.
parent ef44a431
......@@ -188,18 +188,15 @@ QGCCacheWorker::run()
//-- Wait a bit before shutting things down
_waitmutex.lock();
int timeout = 5000;
if(!_waitc.wait(&_waitmutex, timeout))
{
_waitmutex.unlock();
_mutex.lock();
//-- If nothing to do, close db and leave thread
if(!_taskQueue.count()) {
_mutex.unlock();
break;
}
_waitc.wait(&_waitmutex, timeout);
_waitmutex.unlock();
_mutex.lock();
//-- If nothing to do, close db and leave thread
if(!_taskQueue.count()) {
_mutex.unlock();
break;
}
_waitmutex.unlock();
_mutex.unlock();
}
}
if(_db) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment