Move end_threads to subclass since some subclass-specific fields will still be

alive at this time

Conflicts:
	test/cpp/qps/client_sync.cc
pull/1380/head
vjpai 10 years ago
parent c6aa60e510
commit 9ba29cd8f3
  1. 5
      test/cpp/qps/client_sync.cc

@ -73,7 +73,7 @@ class SynchronousClient : public Client {
SetupLoadTest(config, num_threads_); SetupLoadTest(config, num_threads_);
} }
virtual ~SynchronousClient() { EndThreads(); } virtual ~SynchronousClient() {};
protected: protected:
void WaitToIssue(int thread_idx) { void WaitToIssue(int thread_idx) {
@ -91,8 +91,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient {
public: public:
SynchronousUnaryClient(const ClientConfig& config): SynchronousUnaryClient(const ClientConfig& config):
SynchronousClient(config) {StartThreads(num_threads_);} SynchronousClient(config) {StartThreads(num_threads_);}
~SynchronousUnaryClient() {} ~SynchronousUnaryClient() {EndThreads();}
bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE {
WaitToIssue(thread_idx); WaitToIssue(thread_idx);
auto* stub = channels_[thread_idx % channels_.size()].get_stub(); auto* stub = channels_[thread_idx % channels_.size()].get_stub();

Loading…
Cancel
Save