Dont serialize new call requests under the server test lock

pull/1979/head
Craig Tiller 10 years ago
parent c170dee3fc
commit 250e96d941
  1. 3
      test/cpp/qps/server_async.cc

@ -101,10 +101,11 @@ class AsyncQpsServerTest : public Server {
ServerRpcContext *ctx = detag(got_tag); ServerRpcContext *ctx = detag(got_tag);
// The tag is a pointer to an RPC context to invoke // The tag is a pointer to an RPC context to invoke
bool still_going = ctx->RunNextState(ok); bool still_going = ctx->RunNextState(ok);
std::lock_guard<std::mutex> g(shutdown_mutex_); std::unique_lock<std::mutex> g(shutdown_mutex_);
if (!shutdown_) { if (!shutdown_) {
// this RPC context is done, so refresh it // this RPC context is done, so refresh it
if (!still_going) { if (!still_going) {
g.unlock();
ctx->Reset(); ctx->Reset();
} }
} else { } else {

Loading…
Cancel
Save