feat: update

This commit is contained in:
tqcq 2024-10-26 10:09:18 +00:00
parent 6374c128af
commit 9b95b11f4d

View File

@ -360,13 +360,18 @@ find_row_mask(std::vector<set_t> &sets,
} }
step_count -= std::min(step_count, step); step_count -= std::min(step_count, step);
std::lock_guard<std::mutex> _(lock);
if (my_pos > g_base_pos) { if (my_pos > g_base_pos) {
g_base_pos = my_pos; std::lock_guard<std::mutex> _(lock);
row_mask = cur_mask; if (my_pos > g_base_pos) {
g_base_pos = my_pos;
row_mask = cur_mask;
}
} else if (g_base_pos <= g_cur_pos) { } else if (g_base_pos <= g_cur_pos) {
cur_mask = row_mask; std::lock_guard<std::mutex> _(lock);
my_pos = g_base_pos; if (g_base_pos < g_cur_pos) {
cur_mask = row_mask;
my_pos = g_base_pos;
}
} }
} }