Use explicit atomic/CAS to prevent race conditions

They are probably equivalent on x86/64 being single-byte reads/writes,
but it never hurts to be safe.
This commit is contained in:
Mahmoud Al-Qudsi 2019-03-31 18:09:59 -05:00
parent 3c537bfa65
commit b5b9406711

View file

@ -463,7 +463,7 @@ static bool process_clean_after_marking(bool allow_interactive) {
// This function may fire an event handler, we do not want to call ourselves recursively (to
// avoid infinite recursion).
static bool locked = false;
static std::atomic<bool> locked { false };
if (locked) {
return false;
}