From 6a8aa85c8f31c78fe88459ced04f5f6b1ba14d2e Mon Sep 17 00:00:00 2001 From: iaom <18504285112@163.com> Date: Wed, 21 Apr 2021 09:31:03 +0800 Subject: [PATCH] Avoid a deadly bug.:wq --- libsearch/index/first-index.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libsearch/index/first-index.cpp b/libsearch/index/first-index.cpp index 984edd1..ba07138 100644 --- a/libsearch/index/first-index.cpp +++ b/libsearch/index/first-index.cpp @@ -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:"<setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation)); + this->Traverse(); + FileUtils::_max_index_count = this->q_index->length(); + qDebug()<<"max_index_count:"<