diff options
author | 2017-10-10 18:29:56 +0200 | |
---|---|---|
committer | 2017-10-11 10:57:12 +0200 | |
commit | a9c46e5907be66248b6218ae70e0a1d999c696d5 (patch) | |
tree | 378e9323f1cb1ec38d815aa15f41bdcfa59fcf9e /src/main/cpp/blaze.cc | |
parent | 79676a2231fdb373a5ef4821878eb19ca13504a5 (diff) |
Automated rollback of commit 61977f4ae57c877fc28be176f36c28642b276eec.
*** Reason for rollback ***
Breaks a test of Bazel on Windows: http://ci.bazel.io/view/Dashboard/job/bazel-tests/1078/testReport/src_test_py_bazel_bazel_clean_test/exe/src_test_py_bazel_bazel_clean_test_exe/
Fixes #3882.
*** Original change description ***
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.
GO...
***
RELNOTES: None.
PiperOrigin-RevId: 171689429
Diffstat (limited to 'src/main/cpp/blaze.cc')
-rw-r--r-- | src/main/cpp/blaze.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 96d8e56ccb..32b21a12e3 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -1670,6 +1670,11 @@ unsigned int GrpcBlazeServer::Communicate() { 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; |