fix: Yara matching not being interruptable

This commit is contained in:
WerWolv
2022-10-28 14:32:28 +02:00
parent 582858c0d4
commit 5cf6baca88
3 changed files with 17 additions and 1 deletions

View File

@@ -78,6 +78,10 @@ namespace hex {
return this->m_hadException;
}
bool Task::shouldInterrupt() const {
return this->m_shouldInterrupt;
}
bool Task::wasInterrupted() const {
return this->m_interrupted;
}
@@ -136,6 +140,14 @@ namespace hex {
return !task->hadException();
}
bool TaskHolder::shouldInterrupt() const {
if (this->m_task.expired())
return false;
auto task = this->m_task.lock();
return !task->shouldInterrupt();
}
bool TaskHolder::wasInterrupted() const {
if (this->m_task.expired())
return false;