From 681a291d12bb8fc7f8c238fdb674cd0f140294db Mon Sep 17 00:00:00 2001 From: Craig Tiller <ctiller@google.com> Date: Wed, 19 Aug 2015 11:31:25 -0700 Subject: [PATCH] Extend comment --- src/cpp/server/server.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 8b21337529..e039c07374 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)) { -- GitLab