diff options
author | 2016-07-13 19:20:25 -0700 | |
---|---|---|
committer | 2016-07-13 19:20:25 -0700 | |
commit | 40317fd7202ab96f8fb3c1f39258fff1ede3480e (patch) | |
tree | f917d95a39d5b6c27053abe9cc8c35c73253598b /test/cpp/qps/qps_worker.cc | |
parent | ad7c52761895c46a3964ab8864d11c7aa269a29b (diff) |
Resolve pernicious race between destructor and thread functions by insisting that destructor is invoked after the class has gone back to being a harmless single-threaded thing.
Diffstat (limited to 'test/cpp/qps/qps_worker.cc')
-rw-r--r-- | test/cpp/qps/qps_worker.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 49ef52895c..e147734f7a 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -227,6 +227,9 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { gpr_log(GPR_INFO, "RunClientBody: Mark response given"); } + gpr_log(GPR_INFO, "RunClientBody: Awaiting Threads Completion"); + client->AwaitThreadsCompletion(); + gpr_log(GPR_INFO, "RunClientBody: Returning"); return Status::OK; } |