fix
This commit is contained in:
parent
84954da330
commit
234b57fae4
@ -370,15 +370,16 @@ find_row_mask(std::vector<set_t> &sets,
|
|||||||
|
|
||||||
step_count -= std::min(step_count, step / 10);
|
step_count -= std::min(step_count, step / 10);
|
||||||
|
|
||||||
|
// my is new
|
||||||
if (my_pos > g_base_pos.load(std::memory_order_relaxed) + step_count) {
|
if (my_pos > g_base_pos.load(std::memory_order_relaxed) + step_count) {
|
||||||
std::lock_guard<std::mutex> _(lock);
|
std::lock_guard<std::mutex> _(lock);
|
||||||
if (my_pos > g_base_pos + step_count) {
|
if (my_pos > g_base_pos + step_count) {
|
||||||
g_base_pos = my_pos;
|
g_base_pos = my_pos;
|
||||||
row_mask = cur_mask;
|
row_mask = cur_mask;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (g_base_pos.load(std::memory_order_relaxed) <= my_pos) {
|
||||||
std::lock_guard<std::mutex> _(lock);
|
std::lock_guard<std::mutex> _(lock);
|
||||||
if (g_base_pos + step_count <= my_pos) {
|
if (g_base_pos <= my_pos) {
|
||||||
cur_mask = row_mask;
|
cur_mask = row_mask;
|
||||||
step_count = my_pos - g_base_pos;
|
step_count = my_pos - g_base_pos;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user