logic: reduced waiting time when interrupting indexer processes

* made multiprocess AST traversal interruptible again
* removed const variables that define sleep times for threads
This commit is contained in:
mlangkabel
2018-09-21 17:19:03 +02:00
parent 593e075399
commit 951256c07b
44 changed files with 244 additions and 187 deletions
+8 -3
View File
@@ -130,9 +130,14 @@ namespace
}
}
CxxParser::CxxParser(std::shared_ptr<ParserClient> client, std::shared_ptr<FileRegister> fileRegister)
CxxParser::CxxParser(
std::shared_ptr<ParserClient> client,
std::shared_ptr<FileRegister> fileRegister,
std::shared_ptr<IndexerStateInfo> indexerStateInfo
)
: Parser(client)
, m_fileRegister(fileRegister)
, m_indexerStateInfo(indexerStateInfo)
{
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmParser();
@@ -161,7 +166,7 @@ void CxxParser::buildIndex(const std::wstring& fileName, std::shared_ptr<TextAcc
std::make_shared<CanonicalFilePathCache>(m_fileRegister);
std::shared_ptr<CxxDiagnosticConsumer> diagnostics = getDiagnostics(FilePath(), canonicalFilePathCache, false);
ASTActionFactory actionFactory(m_client, canonicalFilePathCache);
ASTActionFactory actionFactory(m_client, canonicalFilePathCache, m_indexerStateInfo);
std::vector<std::string> args = getCommandlineArgumentsEssential(compilerFlags);
@@ -191,7 +196,7 @@ void CxxParser::runTool(clang::tooling::CompilationDatabase* compilationDatabase
LOG_INFO("Clang Invocation errors: " + info.errors);
}
ASTActionFactory actionFactory(m_client, canonicalFilePathCache);
ASTActionFactory actionFactory(m_client, canonicalFilePathCache, m_indexerStateInfo);
tool.run(&actionFactory);
}