Skip to content

Commit

Permalink
[coll] Prevent race during error check. (#10319)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis authored May 28, 2024
1 parent 7354955 commit 2de67f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/collective/loop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ void Loop::Process() {
if (!rc.OK()) {
set_rc(std::move(rc));
} else {
CHECK(qcopy.empty());
std::unique_lock lock{mu_};
CHECK(qcopy.empty() || stop_);
}
} catch (std::exception const& e) {
curr_exce_ = std::current_exception();
Expand Down

0 comments on commit 2de67f0

Please sign in to comment.