Skip to content

Commit 3a3f28f

Browse files
authored
add (#13377)
1 parent a56b663 commit 3a3f28f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

paddle/fluid/operators/distributed/grpc_client.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,18 @@ void GRPCClient::Proceed() {
290290
c->Finish(false);
291291
}
292292

293-
delete c;
293+
bool notify = false;
294294
{
295295
std::lock_guard<std::mutex> lk(sync_mutex_);
296296
req_count_--;
297+
notify = (req_count_ <= 0 || !c->status_.ok());
298+
}
299+
300+
delete c;
301+
302+
if (notify) {
303+
sync_cond_.notify_all();
297304
}
298-
sync_cond_.notify_all();
299305
}
300306
VLOG(3) << "GRPCClient Proceed end";
301307
}

0 commit comments

Comments
 (0)