1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-03-15 17:16:33 +00:00

Switch horses only when certain.

This commit is contained in:
Thomas Harte
2026-02-21 22:42:22 -05:00
parent ea3e9a96f1
commit 2cf0c4f8aa

View File

@@ -253,10 +253,11 @@ void BufferingScanTarget::announce(
}
return true;
};
is_interlaced_.store(
!similar_enough(0, 1) && similar_enough(0, 2) && similar_enough(1, 2),
std::memory_order_relaxed
);
if(!similar_enough(0, 1) && similar_enough(0, 2) && similar_enough(1, 2)) {
is_interlaced_.store(true, std::memory_order_relaxed);
} else if(similar_enough(0, 1)) {
is_interlaced_.store(false, std::memory_order_relaxed);
}
}
// Proceed from here only if a change in visibility has occurred.