diff --git a/lib/libimhex/source/api/task_manager.cpp b/lib/libimhex/source/api/task_manager.cpp index 7f77c0fc6..fc21f188a 100644 --- a/lib/libimhex/source/api/task_manager.cpp +++ b/lib/libimhex/source/api/task_manager.cpp @@ -83,9 +83,9 @@ namespace hex { } void Task::update(u64 value) { - this->m_currValue = value; + this->m_currValue.store(value, std::memory_order_relaxed); - if (this->m_shouldInterrupt) [[unlikely]] + if (this->m_shouldInterrupt.load(std::memory_order_relaxed)) [[unlikely]] throw TaskInterruptor(); }