mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 18:00:26 +00:00
Initialize ImportPipelineStatus::num_active_threads
This commit is contained in:
parent
fd264310c2
commit
ad193b2ace
@ -44,6 +44,8 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
ImportPipelineStatus::ImportPipelineStatus() : num_active_threads(0) {}
|
||||||
|
|
||||||
// Send indexing progress to client if reporting is enabled.
|
// Send indexing progress to client if reporting is enabled.
|
||||||
void EmitProgress(Config* config) {
|
void EmitProgress(Config* config) {
|
||||||
if (config->enableProgressReports) {
|
if (config->enableProgressReports) {
|
||||||
@ -442,6 +444,7 @@ void IndexMain(Config* config,
|
|||||||
Project* project,
|
Project* project,
|
||||||
WorkingFiles* working_files,
|
WorkingFiles* working_files,
|
||||||
MultiQueueWaiter* waiter) {
|
MultiQueueWaiter* waiter) {
|
||||||
|
auto* queue = QueueManager::instance();
|
||||||
// Build one index per-indexer, as building the index acquires a global lock.
|
// Build one index per-indexer, as building the index acquires a global lock.
|
||||||
ClangIndex index;
|
ClangIndex index;
|
||||||
|
|
||||||
@ -475,8 +478,6 @@ void IndexMain(Config* config,
|
|||||||
|
|
||||||
status->num_active_threads--;
|
status->num_active_threads--;
|
||||||
|
|
||||||
auto* queue = QueueManager::instance();
|
|
||||||
|
|
||||||
// We didn't do any work, so wait for a notification.
|
// We didn't do any work, so wait for a notification.
|
||||||
if (!did_parse && !did_create_update && !did_merge && !did_load_previous) {
|
if (!did_parse && !did_create_update && !did_merge && !did_load_previous) {
|
||||||
waiter->Wait({&queue->index_request, &queue->on_id_mapped,
|
waiter->Wait({&queue->index_request, &queue->on_id_mapped,
|
||||||
|
@ -15,6 +15,8 @@ struct WorkingFiles;
|
|||||||
|
|
||||||
struct ImportPipelineStatus {
|
struct ImportPipelineStatus {
|
||||||
std::atomic<int> num_active_threads;
|
std::atomic<int> num_active_threads;
|
||||||
|
|
||||||
|
ImportPipelineStatus();
|
||||||
};
|
};
|
||||||
|
|
||||||
void IndexWithTuFromCodeCompletion(
|
void IndexWithTuFromCodeCompletion(
|
||||||
|
Loading…
Reference in New Issue
Block a user