Avoid a deadly bug.:wq

This commit is contained in:
iaom 2021-04-21 09:31:03 +08:00
parent 75f4eade12
commit 6a8aa85c8f
1 changed files with 9 additions and 9 deletions

View File

@ -144,15 +144,15 @@ void FirstIndex::run(){
mutex2.lock();
mutex3.lock();
sem.acquire(4);
QtConcurrent::run([&](){
sem.acquire(1);
mutex1.unlock();
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->Traverse();
FileUtils::_max_index_count = this->q_index->length();
qDebug()<<"max_index_count:"<<FileUtils::_max_index_count;
sem.release(5);
});
// QtConcurrent::run([&](){
sem.acquire(1);
mutex1.unlock();
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
this->Traverse();
FileUtils::_max_index_count = this->q_index->length();
qDebug()<<"max_index_count:"<<FileUtils::_max_index_count;
sem.release(5);
// });
QtConcurrent::run([&](){
sem.acquire(2);
mutex2.unlock();