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
050e37aa
Commit
050e37aa
authored
10 years ago
by
Yang Gao
Browse files
Options
Downloads
Patches
Plain Diff
resolve merge error
parent
1fc04690
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
include/grpc++/completion_queue.h
+44
-46
44 additions, 46 deletions
include/grpc++/completion_queue.h
with
44 additions
and
46 deletions
include/grpc++/completion_queue.h
+
44
−
46
View file @
050e37aa
...
...
@@ -86,53 +86,51 @@ class CompletionQueue {
// Blocking (until deadline) read from queue.
// Returns false if the queue is ready for destruction, true if event
bool
Next
(
void
**
tag
,
bool
*
ok
)
{
return
(
AsyncNext
(
tag
,
ok
,
std
::
chrono
::
system_clock
::
time_point
::
max
())
!=
SHUTDOWN
);
bool
Next
(
void
**
tag
,
bool
*
ok
)
{
return
(
AsyncNext
(
tag
,
ok
,
(
std
::
chrono
::
system_clock
::
time_point
::
max
)())
!=
SHUTDOWN
);
}
// Shutdown has to be called, and the CompletionQueue can only be
// destructed when false is returned from Next().
void
Shutdown
();
grpc_completion_queue
*
cq
()
{
return
cq_
;
}
private
:
// Friend synchronous wrappers so that they can access Pluck(), which is
// a semi-private API geared towards the synchronous implementation.
template
<
class
R
>
friend
class
::
grpc
::
ClientReader
;
template
<
class
W
>
friend
class
::
grpc
::
ClientWriter
;
template
<
class
R
,
class
W
>
friend
class
::
grpc
::
ClientReaderWriter
;
template
<
class
R
>
friend
class
::
grpc
::
ServerReader
;
template
<
class
W
>
friend
class
::
grpc
::
ServerWriter
;
template
<
class
R
,
class
W
>
friend
class
::
grpc
::
ServerReaderWriter
;
friend
class
::
grpc
::
Server
;
friend
class
::
grpc
::
ServerContext
;
friend
Status
BlockingUnaryCall
(
ChannelInterface
*
channel
,
const
RpcMethod
&
method
,
ClientContext
*
context
,
const
grpc
::
protobuf
::
Message
&
request
,
grpc
::
protobuf
::
Message
*
result
);
// Wraps grpc_completion_queue_pluck.
// Cannot be mixed with calls to Next().
bool
Pluck
(
CompletionQueueTag
*
tag
);
// Does a single polling pluck on tag
void
TryPluck
(
CompletionQueueTag
*
tag
);
grpc_completion_queue
*
cq_
;
// owned
};
return
(
AsyncNext
(
tag
,
ok
,
(
std
::
chrono
::
system_clock
::
time_point
::
max
)())
!=
SHUTDOWN
);
}
// Shutdown has to be called, and the CompletionQueue can only be
// destructed when false is returned from Next().
void
Shutdown
();
grpc_completion_queue
*
cq
()
{
return
cq_
;
}
private
:
// Friend synchronous wrappers so that they can access Pluck(), which is
// a semi-private API geared towards the synchronous implementation.
template
<
class
R
>
friend
class
::
grpc
::
ClientReader
;
template
<
class
W
>
friend
class
::
grpc
::
ClientWriter
;
template
<
class
R
,
class
W
>
friend
class
::
grpc
::
ClientReaderWriter
;
template
<
class
R
>
friend
class
::
grpc
::
ServerReader
;
template
<
class
W
>
friend
class
::
grpc
::
ServerWriter
;
template
<
class
R
,
class
W
>
friend
class
::
grpc
::
ServerReaderWriter
;
friend
class
::
grpc
::
Server
;
friend
class
::
grpc
::
ServerContext
;
friend
Status
BlockingUnaryCall
(
ChannelInterface
*
channel
,
const
RpcMethod
&
method
,
ClientContext
*
context
,
const
grpc
::
protobuf
::
Message
&
request
,
grpc
::
protobuf
::
Message
*
result
);
// Wraps grpc_completion_queue_pluck.
// Cannot be mixed with calls to Next().
bool
Pluck
(
CompletionQueueTag
*
tag
);
// Does a single polling pluck on tag
void
TryPluck
(
CompletionQueueTag
*
tag
);
grpc_completion_queue
*
cq_
;
// owned
};
}
// namespace grpc
...
...
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