From 81f156be08a5625441ff758b196ab5dcb96a8d7e Mon Sep 17 00:00:00 2001 From: tqcq Date: Sat, 26 Oct 2024 10:05:17 +0000 Subject: [PATCH] feat update --- drama/src/rev-mc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drama/src/rev-mc.c b/drama/src/rev-mc.c index cdc1873..8ff89fb 100644 --- a/drama/src/rev-mc.c +++ b/drama/src/rev-mc.c @@ -372,7 +372,8 @@ find_row_mask(std::vector &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 _(lock); row_mask = cur_mask; break;