diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 8b213375295075b76d35b8525f059a44d2b00d92..e039c07374d89759c76fd48701cb4f5310a3b0f5 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -332,6 +332,8 @@ void Server::ShutdownInternal(gpr_timespec deadline) { // Spin, eating requests until the completion queue is completely shutdown. // If the deadline expires then cancel anything that's pending and keep // spinning forever until the work is actually drained. + // Since nothing else needs to touch state guarded by mu_, holding it + // through this loop is fine. SyncRequest* request; bool ok; while (SyncRequest::AsyncWait(&cq_, &request, &ok, deadline)) {