From 58a62755fc6546a117b7b8f3a0a344f85b2ea5f9 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 13 Feb 2018 14:40:39 -0800 Subject: Remove support for detached threads. All threads must be joined. --- test/core/bad_client/bad_client.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/core/bad_client') diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc index 6055ccbf4b..9abc1c40d9 100644 --- a/test/core/bad_client/bad_client.cc +++ b/test/core/bad_client/bad_client.cc @@ -220,11 +220,11 @@ void grpc_run_bad_client_test( /* Check a ground truth */ GPR_ASSERT(grpc_server_has_open_connections(a.server)); - gpr_thd_id id; + gpr_thd_id server_validator_id; gpr_event_init(&a.done_thd); a.validator = server_validator; /* Start validator */ - gpr_thd_new(&id, "grpc_bad_client", thd_func, &a, nullptr); + gpr_thd_new(&server_validator_id, "grpc_bad_client", thd_func, &a); for (int i = 0; i < num_args; i++) { grpc_run_client_side_validator(&args[i], i == (num_args - 1) ? flags : 0, &sfd, client_cq); @@ -234,6 +234,7 @@ void grpc_run_bad_client_test( /* Shutdown. */ shutdown_client(&sfd.client); + gpr_thd_join(server_validator_id); shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr); grpc_server_shutdown_and_notify(a.server, shutdown_cq, nullptr); -- cgit v1.2.3