Skip to content
Snippets Groups Projects
Commit e51d29d9 authored by Vijay Pai's avatar Vijay Pai
Browse files

Remove some std:: so that grpc:: will be used by default when available

parent 9f3bbb00
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service { ...@@ -95,7 +95,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
MaybeEchoDeadline(context, request, response); MaybeEchoDeadline(context, request, response);
if (request->has_param() && request->param().client_cancel_after_us()) { if (request->has_param() && request->param().client_cancel_after_us()) {
{ {
std::unique_lock<std::mutex> lock(mu_); unique_lock<mutex> lock(mu_);
signal_client_ = true; signal_client_ = true;
} }
while (!context->IsCancelled()) { while (!context->IsCancelled()) {
...@@ -160,13 +160,13 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service { ...@@ -160,13 +160,13 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
} }
bool signal_client() { bool signal_client() {
std::unique_lock<std::mutex> lock(mu_); unique_lock<mutex> lock(mu_);
return signal_client_; return signal_client_;
} }
private: private:
bool signal_client_; bool signal_client_;
std::mutex mu_; mutex mu_;
}; };
class TestServiceImplDupPkg class TestServiceImplDupPkg
...@@ -262,7 +262,7 @@ class AsyncClientEnd2endTest : public ::testing::Test { ...@@ -262,7 +262,7 @@ class AsyncClientEnd2endTest : public ::testing::Test {
} }
void Wait() { void Wait() {
std::unique_lock<std::mutex> l(mu_); unique_lock<mutex> l(mu_);
while (rpcs_outstanding_ != 0) { while (rpcs_outstanding_ != 0) {
cv_.wait(l); cv_.wait(l);
} }
...@@ -287,7 +287,7 @@ class AsyncClientEnd2endTest : public ::testing::Test { ...@@ -287,7 +287,7 @@ class AsyncClientEnd2endTest : public ::testing::Test {
call->response_reader->Finish(&call->response, &call->status, call->response_reader->Finish(&call->response, &call->status,
(void*)call); (void*)call);
std::unique_lock<std::mutex> l(mu_); unique_lock<mutex> l(mu_);
rpcs_outstanding_++; rpcs_outstanding_++;
} }
} }
...@@ -303,7 +303,7 @@ class AsyncClientEnd2endTest : public ::testing::Test { ...@@ -303,7 +303,7 @@ class AsyncClientEnd2endTest : public ::testing::Test {
bool notify; bool notify;
{ {
std::unique_lock<std::mutex> l(mu_); unique_lock<mutex> l(mu_);
rpcs_outstanding_--; rpcs_outstanding_--;
notify = (rpcs_outstanding_ == 0); notify = (rpcs_outstanding_ == 0);
} }
...@@ -315,8 +315,8 @@ class AsyncClientEnd2endTest : public ::testing::Test { ...@@ -315,8 +315,8 @@ class AsyncClientEnd2endTest : public ::testing::Test {
CommonStressTest common_; CommonStressTest common_;
CompletionQueue cq_; CompletionQueue cq_;
std::mutex mu_; mutex mu_;
std::condition_variable cv_; condition_variable cv_;
int rpcs_outstanding_; int rpcs_outstanding_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment