data: indexer processes
* TaskBuildIndex starts seperate indexer processes and communicates via shared memory * indexer processes get restarted if they fail * indexer processes are killed when the app closes or crashes * added utility class SharedMemory to allocate and access shared memory, providing basic data structures * added SharedMemoryGarbageCollector for keeping track of running instances and cleaning up shared memory in case of a crash * show errors for source files that crashed during indexing * added basic exception handling to task scheduling * added option to turn off processes and use threads in preferences, but still use shared memory fortune cookie message = Good news from someone dear is coming soon.
This commit is contained in:
@@ -324,11 +324,11 @@ std::vector<BookmarkCategory> PersistentStorage::getAllBookmarkCategories() cons
|
||||
return categories;
|
||||
}
|
||||
|
||||
void PersistentStorage::forEachNode(std::function<void(const Id /*id*/, const StorageNode& /*data*/)> callback) const
|
||||
void PersistentStorage::forEachNode(std::function<void(const StorageNode& /*data*/)> callback) const
|
||||
{
|
||||
for (StorageNode& node: m_sqliteIndexStorage.getAll<StorageNode>())
|
||||
{
|
||||
callback(node.id, node);
|
||||
callback(node);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -348,29 +348,27 @@ void PersistentStorage::forEachSymbol(std::function<void(const StorageSymbol& /*
|
||||
}
|
||||
}
|
||||
|
||||
void PersistentStorage::forEachEdge(std::function<void(const Id /*id*/, const StorageEdge& /*data*/)> callback) const
|
||||
void PersistentStorage::forEachEdge(std::function<void(const StorageEdge& /*data*/)> callback) const
|
||||
{
|
||||
for (StorageEdge& edge: m_sqliteIndexStorage.getAll<StorageEdge>())
|
||||
{
|
||||
callback(edge.id, edge);
|
||||
callback(edge);
|
||||
}
|
||||
}
|
||||
|
||||
void PersistentStorage::forEachLocalSymbol(std::function<void(
|
||||
const Id /*id*/, const StorageLocalSymbol& /*data*/)> callback) const
|
||||
void PersistentStorage::forEachLocalSymbol(std::function<void(const StorageLocalSymbol& /*data*/)> callback) const
|
||||
{
|
||||
for (StorageLocalSymbol& localSymbol: m_sqliteIndexStorage.getAll<StorageLocalSymbol>())
|
||||
{
|
||||
callback(localSymbol.id, localSymbol);
|
||||
callback(localSymbol);
|
||||
}
|
||||
}
|
||||
|
||||
void PersistentStorage::forEachSourceLocation(
|
||||
std::function<void(const Id /*id*/, const StorageSourceLocation& /*data*/)> callback) const
|
||||
void PersistentStorage::forEachSourceLocation(std::function<void(const StorageSourceLocation& /*data*/)> callback) const
|
||||
{
|
||||
for (StorageSourceLocation& sourceLocation: m_sqliteIndexStorage.getAll<StorageSourceLocation>())
|
||||
{
|
||||
callback(sourceLocation.id, sourceLocation);
|
||||
callback(sourceLocation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user