Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cpp/src/mip_heuristics/diversity/population.cu
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ void population_t<i_t, f_t>::add_external_solution(const std::vector<f_t>& solut
template <typename i_t, typename f_t>
void population_t<i_t, f_t>::add_external_solutions_to_population()
{
// early exit to avoid taking the population lock
if (!solutions_in_external_queue_.load()) { return; }

// don't do early exit checks here. mutex needs to be acquired to prevent race conditions
auto new_sol_vector = get_external_solutions();
add_solutions_from_vec(std::move(new_sol_vector));
}
Expand Down