1
0
mirror of synced 2024-11-28 09:30:51 +01:00

impr: Increase performance when updating task progress

This commit is contained in:
WerWolv 2023-11-23 09:20:26 +01:00
parent de4ea4081a
commit 74e246feed

View File

@ -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();
}