Commit 5ff37c6f authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Parser: Decrement the number of completed tasks before the scheduled one

The rest of the code assumes that scheduled >= done, so setting done to
0 first could briefly invalidate this assumption.
Note that this doesn't have any effect with relaxed memory order, which
will change in next commit
parent b169e845
...@@ -108,8 +108,8 @@ void Parser::flush() ...@@ -108,8 +108,8 @@ void Parser::flush()
* The services are now paused so we are ensured we won't have a concurrent * The services are now paused so we are ensured we won't have a concurrent
* update for the task counters * update for the task counters
*/ */
m_opScheduled.store( 0, std::memory_order_relaxed );
m_opDone.store( 0, std::memory_order_relaxed ); m_opDone.store( 0, std::memory_order_relaxed );
m_opScheduled.store( 0, std::memory_order_relaxed );
} }
void Parser::prepareRescan() void Parser::prepareRescan()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment