From 9ba29cd8f347f4d53ba318f85646d900a5206dca Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 29 Apr 2015 10:40:26 -0700 Subject: [PATCH] Move end_threads to subclass since some subclass-specific fields will still be alive at this time Conflicts: test/cpp/qps/client_sync.cc --- test/cpp/qps/client_sync.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 8573ddb542c..9371a5a081b 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -73,7 +73,7 @@ class SynchronousClient : public Client { SetupLoadTest(config, num_threads_); } - virtual ~SynchronousClient() { EndThreads(); } + virtual ~SynchronousClient() {}; protected: void WaitToIssue(int thread_idx) { @@ -91,8 +91,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { public: SynchronousUnaryClient(const ClientConfig& config): SynchronousClient(config) {StartThreads(num_threads_);} - ~SynchronousUnaryClient() {} - + ~SynchronousUnaryClient() {EndThreads();} bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { WaitToIssue(thread_idx); auto* stub = channels_[thread_idx % channels_.size()].get_stub();