Don't release the client lock while the server executes a command. The
server still doesn't support concurrency, even for commands like 'help',
so there's no benefit from releasing it.
This also improves progress messages. Today the client may print
WARNING: Running Blaze server needs to be killed, because the startup options are different.
and then wait indefinitely while the server finishes processing a
request. With this change, an explanation for the delay is given.
RELNOTES: None.
PiperOrigin-RevId: 171571670
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 32b21a1..96d8e56 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -1670,11 +1670,6 @@
std::unique_ptr<grpc::ClientReader<command_server::RunResponse>> reader(
client_->Run(&context, request));
- // Release the server lock because the gRPC handles concurrent clients just
- // fine. Note that this may result in two "waiting for other client" messages
- // (one during server startup and one emitted by the server)
- blaze::ReleaseLock(&blaze_lock_);
-
std::thread cancel_thread(&GrpcBlazeServer::CancelThread, this);
bool command_id_set = false;
bool pipe_broken = false;