feat: Implement Myers' diffing algorithm (#1508)

This commit is contained in:
Nik
2024-01-21 18:39:13 +01:00
committed by GitHub
parent 9d351317b8
commit a13b5bf8c0
41 changed files with 624 additions and 215 deletions

View File

@@ -31,6 +31,7 @@ namespace hex {
std::vector<std::jthread> s_workers;
thread_local std::array<char, 256> s_currentThreadName;
thread_local Task* s_currentTask = nullptr;
}
@@ -228,6 +229,8 @@ namespace hex {
// Grab the next task from the queue
task = std::move(s_taskQueue.front());
s_taskQueue.pop_front();
s_currentTask = task.get();
}
try {
@@ -253,6 +256,7 @@ namespace hex {
task->exception("Unknown Exception");
}
s_currentTask = nullptr;
task->finish();
}
});
@@ -326,6 +330,11 @@ namespace hex {
}
Task& TaskManager::getCurrentTask() {
return *s_currentTask;
}
std::list<std::shared_ptr<Task>> &TaskManager::getRunningTasks() {
return s_tasks;
}