aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/qps/client.rb
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-04 16:01:23 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-11-04 16:01:23 -0700
commit194b23856aa7251ad99df62134ab0301c5a37a5d (patch)
treea6c2c05cecae62171fccffafdf7adc1ba90d4846 /src/ruby/qps/client.rb
parent40c8fba13c7cbed7df5f92b3bab4131178410ccd (diff)
parent80eb075e633219cf8972e778eb449d2271ee92ad (diff)
Merge github.com:grpc/grpc into decouple_version_number
Diffstat (limited to 'src/ruby/qps/client.rb')
-rw-r--r--src/ruby/qps/client.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ruby/qps/client.rb b/src/ruby/qps/client.rb
index 7ed648acef..8aed866da5 100644
--- a/src/ruby/qps/client.rb
+++ b/src/ruby/qps/client.rb
@@ -89,12 +89,14 @@ class BenchmarkClient
payload: gtp.new(type: gtpt::COMPRESSABLE,
body: nulls(simple_params.req_size)))
+ @child_threads = []
+
(0..config.client_channels-1).each do |chan|
gtbss = Grpc::Testing::BenchmarkService::Stub
st = config.server_targets
stub = gtbss.new(st[chan % st.length], cred, **opts)
(0..config.outstanding_rpcs_per_channel-1).each do |r|
- Thread.new {
+ @child_threads << Thread.new {
case config.load_params.load.to_s
when 'closed_loop'
waiter = nil
@@ -162,5 +164,8 @@ class BenchmarkClient
end
def shutdown
@done = true
+ @child_threads.each do |thread|
+ thread.join
+ end
end
end