forked from qt-creator/qt-creator
ClangRefactoring: Add SymbolIndexerTaskScheduler
The scheduler is managing the asynchronous tasks by using the symbols collector manager. Every symbols collector can be used by only one thread, so the we have to pass the symbols collector around by the future interface to make the available again after a task is finished. Change-Id: Ic2eeaa986c2d93978d043216c46e8cb38cea769f Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -34,14 +34,18 @@
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class SymbolsCollectorInterface;
|
||||
class SymbolStorageInterface;
|
||||
|
||||
class SymbolIndexerTask
|
||||
{
|
||||
public:
|
||||
using CallableType = std::function<void()>;
|
||||
using Callable = std::function<void(SymbolsCollectorInterface &symbolsCollector,
|
||||
SymbolStorageInterface &symbolStorage)>;
|
||||
|
||||
SymbolIndexerTask(FilePathId filePathId,
|
||||
std::size_t projectPartId,
|
||||
CallableType &&callable)
|
||||
Callable &&callable)
|
||||
: callable(std::move(callable)),
|
||||
filePathId(filePathId),
|
||||
projectPartId(projectPartId)
|
||||
@@ -67,7 +71,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
CallableType callable;
|
||||
Callable callable;
|
||||
FilePathId filePathId;
|
||||
std::size_t projectPartId;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user