feat update

This commit is contained in:
tqcq 2024-10-26 10:05:17 +00:00
parent f5f16fcac7
commit 81f156be08

View File

@ -372,7 +372,8 @@ find_row_mask(std::vector<set_t> &sets,
for (int i = 0; i < step && cur_mask < last_mask && !found.load(std::memory_order_relaxed); ++i) {
if (resolve(cur_mask)) {
if (!found.exchange(true)) {
bool expected = false;
if (found.compare_exchange_strong(expected, true)) {
std::lock_guard<std::mutex> _(lock);
row_mask = cur_mask;
break;