diff options
author | yang-g <yangg@google.com> | 2016-07-11 15:48:01 -0700 |
---|---|---|
committer | yang-g <yangg@google.com> | 2016-07-11 15:48:01 -0700 |
commit | e89dc6ceb60669e97b74e52311497af110dc4f21 (patch) | |
tree | c9bd071c415eeaaf46ccfc433fb11c0e86bd0af9 /src/cpp/server | |
parent | 7a1ac58ed0716666b77bda4f9d44d0b224509834 (diff) |
Make Server::Wait work for async only server.
Diffstat (limited to 'src/cpp/server')
-rw-r--r-- | src/cpp/server/server.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index fb4c68ebe4..374c9cbc04 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -462,14 +462,13 @@ void Server::ShutdownInternal(gpr_timespec deadline) { while (num_running_cb_ != 0) { callback_cv_.wait(lock); } + shutdown_cv_.notify_all(); } } void Server::Wait() { grpc::unique_lock<grpc::mutex> lock(mu_); - while (num_running_cb_ != 0) { - callback_cv_.wait(lock); - } + shutdown_cv_.wait(lock); } void Server::PerformOpsOnCall(CallOpSetInterface* ops, Call* call) { |