[coll] Prevent race during error check. (#10319)
This commit is contained in:
parent
7354955cbb
commit
2de67f0050
@ -185,7 +185,8 @@ void Loop::Process() {
|
|||||||
if (!rc.OK()) {
|
if (!rc.OK()) {
|
||||||
set_rc(std::move(rc));
|
set_rc(std::move(rc));
|
||||||
} else {
|
} else {
|
||||||
CHECK(qcopy.empty());
|
std::unique_lock lock{mu_};
|
||||||
|
CHECK(qcopy.empty() || stop_);
|
||||||
}
|
}
|
||||||
} catch (std::exception const& e) {
|
} catch (std::exception const& e) {
|
||||||
curr_exce_ = std::current_exception();
|
curr_exce_ = std::current_exception();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user