forked from qt-creator/qt-creator
		
	CppTools: Use a shared thread pool
Without this, too many threads are spawned, and loading a project takes forever. Change-Id: I3c22557ddd7bfb0c70f7b089c276432e3b003097 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
		
				
					committed by
					
						 Orgad Shaneh
						Orgad Shaneh
					
				
			
			
				
	
			
			
			
						parent
						
							9c0faff713
						
					
				
				
					commit
					6234511a2c
				
			| @@ -365,7 +365,8 @@ void CppFindReferences::findAll_helper(SearchResult *search, Symbol *symbol, | ||||
|     SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus); | ||||
|     const WorkingCopy workingCopy = m_modelManager->workingCopy(); | ||||
|     QFuture<Usage> result; | ||||
|     result = Utils::runAsync(find_helper, workingCopy, context, symbol); | ||||
|     result = Utils::runAsync(m_modelManager->sharedThreadPool(), find_helper, | ||||
|                              workingCopy, context, symbol); | ||||
|     createWatcher(result, search); | ||||
|  | ||||
|     FutureProgress *progress = ProgressManager::addTask(result, tr("Searching for Usages"), | ||||
| @@ -669,7 +670,8 @@ void CppFindReferences::findMacroUses(const Macro ¯o, const QString &replace | ||||
|     } | ||||
|  | ||||
|     QFuture<Usage> result; | ||||
|     result = Utils::runAsync(findMacroUses_helper, workingCopy, snapshot, macro); | ||||
|     result = Utils::runAsync(m_modelManager->sharedThreadPool(), findMacroUses_helper, | ||||
|                              workingCopy, snapshot, macro); | ||||
|     createWatcher(result, search); | ||||
|  | ||||
|     FutureProgress *progress = ProgressManager::addTask(result, tr("Searching for Usages"), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user