feat: Allow task stop button to abort pattern evaluation

This commit is contained in:
WerWolv
2022-09-13 16:05:41 +02:00
parent 5b00c8ee08
commit 20a2331504
3 changed files with 13 additions and 1 deletions

View File

@@ -72,6 +72,13 @@ namespace hex {
std::scoped_lock lock(this->m_mutex);
this->m_shouldInterrupt = true;
if (this->m_interruptCallback)
this->m_interruptCallback();
}
void Task::setInterruptCallback(std::function<void()> callback) {
this->m_interruptCallback = std::move(callback);
}
bool Task::isFinished() const {