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