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
8079afa4
Commit
8079afa4
authored
8 years ago
by
vjpai
Browse files
Options
Downloads
Patches
Plain Diff
New CQ for each client call
parent
c75787ba
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
src/ruby/lib/grpc/generic/client_stub.rb
+7
-4
7 additions, 4 deletions
src/ruby/lib/grpc/generic/client_stub.rb
with
7 additions
and
4 deletions
src/ruby/lib/grpc/generic/client_stub.rb
+
7
−
4
View file @
8079afa4
...
...
@@ -85,7 +85,8 @@ module GRPC
# when present, this is the default timeout used for calls
#
# @param host [String] the host the stub connects to
# @param q [Core::CompletionQueue] used to wait for events
# @param q [Core::CompletionQueue] used to wait for events - now deprecated
# since each new active call gets its own separately
# @param creds [Core::ChannelCredentials|Symbol] the channel credentials, or
# :this_channel_is_insecure
# @param channel_override [Core::Channel] a pre-created channel
...
...
@@ -97,7 +98,6 @@ module GRPC
propagate_mask:
nil
,
**
kw
)
fail
(
TypeError
,
'!CompletionQueue'
)
unless
q
.
is_a?
(
Core
::
CompletionQueue
)
@queue
=
q
@ch
=
ClientStub
.
setup_channel
(
channel_override
,
host
,
creds
,
**
kw
)
alt_host
=
kw
[
Core
::
Channel
::
SSL_TARGET
]
@host
=
alt_host
.
nil?
?
host
:
alt_host
...
...
@@ -458,14 +458,17 @@ module GRPC
if
deadline
.
nil?
deadline
=
from_relative_time
(
timeout
.
nil?
?
@timeout
:
timeout
)
end
call
=
@ch
.
create_call
(
@queue
,
# Provide each new client call with its own completion queue
call_queue
=
Core
::
CompletionQueue
.
new
call
=
@ch
.
create_call
(
call_queue
,
parent
,
# parent call
@propagate_mask
,
# propagation options
method
,
nil
,
# host use nil,
deadline
)
call
.
set_credentials!
credentials
unless
credentials
.
nil?
ActiveCall
.
new
(
call
,
@queue
,
marshal
,
unmarshal
,
deadline
,
started:
false
)
ActiveCall
.
new
(
call
,
call_queue
,
marshal
,
unmarshal
,
deadline
,
started:
false
)
end
end
end
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