Skip to content

Commit

Permalink
Properly lock concurrent data access (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMarechal25 authored Jan 16, 2025
2 parents 51c2ede + 001759b commit 91df808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/benders/benders_core/BendersBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ void BendersBase::GetSubproblemCut(SubProblemDataMap &subproblem_data_map) {
SolveSubproblem(subproblem_data_map, subproblem_data, name,
worker);

subproblem_data_map[name] = subproblem_data;
std::lock_guard guard(m);
subproblem_data_map[name] = subproblem_data;
});
},
shouldParallelize());
Expand Down

0 comments on commit 91df808

Please sign in to comment.