Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
e51d29d9
Commit
e51d29d9
authored
9 years ago
by
Vijay Pai
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/cpp/end2end/thread_stress_test.cc
+8
-8
8 additions, 8 deletions
test/cpp/end2end/thread_stress_test.cc
with
8 additions
and
8 deletions
test/cpp/end2end/thread_stress_test.cc
+
8
−
8
View file @
e51d29d9
...
@@ -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_
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment