ccls/src/import_manager.cc
Jacob Dufault 3599a831b1 Introduce MessageHandler abstraction. Mainly just code reorg.
Only the initialize request uses it so far, but this will enable pulling
quite a bit of code out of command_line.cc.
2017-12-04 23:57:41 -08:00

18 lines
517 B
C++

#include "import_manager.h"
bool ImportManager::TryMarkDependencyImported(const std::string& path) {
std::lock_guard<std::mutex> lock(depdency_mutex_);
return depdency_imported_.insert(path).second;
}
bool ImportManager::StartQueryDbImport(const std::string& path) {
return querydb_processing_.insert(path).second;
}
void ImportManager::DoneQueryDbImport(const std::string& path) {
querydb_processing_.erase(path);
}
bool ImportManager::HasActiveQuerydbImports() {
return !querydb_processing_.empty();
}