mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
feat: Implement Myers' diffing algorithm (#1508)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user