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
d5d9d9e6
Commit
d5d9d9e6
authored
8 years ago
by
Ken Payson
Browse files
Options
Downloads
Patches
Plain Diff
Store cython-level call in grpc.Call
This allows inspecting c-level properties of the call after completion.
parent
e60d5ff8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/python/grpcio/grpc/_channel.py
+16
-16
16 additions, 16 deletions
src/python/grpcio/grpc/_channel.py
with
16 additions
and
16 deletions
src/python/grpcio/grpc/_channel.py
+
16
−
16
View file @
d5d9d9e6
...
...
@@ -444,10 +444,10 @@ def _start_unary_request(request, timeout, request_serializer):
return
deadline
,
deadline_timespec
,
serialized_request
,
None
def
_end_unary_response_blocking
(
state
,
with_call
,
deadline
):
def
_end_unary_response_blocking
(
state
,
call
,
with_call
,
deadline
):
if
state
.
code
is
grpc
.
StatusCode
.
OK
:
if
with_call
:
rendezvous
=
_Rendezvous
(
state
,
None
,
None
,
deadline
)
rendezvous
=
_Rendezvous
(
state
,
call
,
None
,
deadline
)
return
state
.
response
,
rendezvous
else
:
return
state
.
response
...
...
@@ -499,17 +499,17 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
_check_call_error
(
call_error
,
metadata
)
_handle_event
(
completion_queue
.
poll
(),
state
,
self
.
_response_deserializer
)
return
state
,
deadline
return
state
,
call
,
deadline
def
__call__
(
self
,
request
,
timeout
=
None
,
metadata
=
None
,
credentials
=
None
):
state
,
deadline
,
=
self
.
_blocking
(
request
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
False
,
deadline
)
state
,
call
,
deadline
=
self
.
_blocking
(
request
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
call
,
False
,
deadline
)
def
with_call
(
self
,
request
,
timeout
=
None
,
metadata
=
None
,
credentials
=
None
):
state
,
deadline
,
=
self
.
_blocking
(
request
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
True
,
deadline
)
state
,
call
,
deadline
=
self
.
_blocking
(
request
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
call
,
True
,
deadline
)
def
future
(
self
,
request
,
timeout
=
None
,
metadata
=
None
,
credentials
=
None
):
state
,
operations
,
deadline
,
deadline_timespec
,
rendezvous
=
self
.
_prepare
(
...
...
@@ -619,25 +619,25 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
state
.
condition
.
notify_all
()
if
not
state
.
due
:
break
return
state
,
deadline
return
state
,
call
,
deadline
def
__call__
(
self
,
request_iterator
,
timeout
=
None
,
metadata
=
None
,
credentials
=
None
):
state
,
deadline
,
=
self
.
_blocking
(
request_iterator
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
False
,
deadline
)
state
,
call
,
deadline
=
self
.
_blocking
(
request_iterator
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
call
,
False
,
deadline
)
def
with_call
(
self
,
request_iterator
,
timeout
=
None
,
metadata
=
None
,
credentials
=
None
):
state
,
deadline
,
=
self
.
_blocking
(
request_iterator
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
True
,
deadline
)
state
,
call
,
deadline
=
self
.
_blocking
(
request_iterator
,
timeout
,
metadata
,
credentials
)
return
_end_unary_response_blocking
(
state
,
call
,
True
,
deadline
)
def
future
(
self
,
request_iterator
,
...
...
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