logic: Limit multi process indexing to projects with C/C++ source groups

This commit is contained in:
Eberhard Graether
2017-05-08 14:45:37 +02:00
parent ad1a48bce4
commit 14fa67b909
6 changed files with 28 additions and 20 deletions
+4 -4
View File
@@ -27,11 +27,13 @@ TaskBuildIndex::TaskBuildIndex(
unsigned int processCount,
std::shared_ptr<IndexerCommandList> indexerCommandList,
std::shared_ptr<StorageProvider> storageProvider,
std::shared_ptr<FileRegisterStateData> fileRegisterStateData
std::shared_ptr<FileRegisterStateData> fileRegisterStateData,
bool multiProcessIndexing
)
: m_indexerCommandList(indexerCommandList)
, m_storageProvider(storageProvider)
, m_fileRegisterStateData(fileRegisterStateData)
, m_multiProcessIndexing(multiProcessIndexing)
, m_interprocessIndexerCommandManager(Application::getUUID(), 0, true)
, m_interprocessIndexingStatusManager(Application::getUUID(), 0, true)
, m_processCount(processCount)
@@ -61,8 +63,6 @@ void TaskBuildIndex::doEnter(std::shared_ptr<Blackboard> blackboard)
logFilePath = dynamic_cast<FileLogger*>(logger)->getLogFilePath().str();
}
bool multiProcess = ApplicationSettings::getInstance()->getMultiProcessIndexingEnabled();
// start indexer processes
for (unsigned int i = 0; i < m_processCount; i++)
{
@@ -72,7 +72,7 @@ void TaskBuildIndex::doEnter(std::shared_ptr<Blackboard> blackboard)
std::make_shared<InterprocessIntermediateStorageManager>(Application::getUUID(), processId, true)
);
if (multiProcess)
if (m_multiProcessIndexing)
{
m_processThreads.push_back(new std::thread(&TaskBuildIndex::runIndexerProcess, this, processId, logFilePath));
}