aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/handshake/client_ssl.cc
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-02-16 22:59:03 -0800
committerGravatar Vijay Pai <vpai@google.com>2018-02-19 22:39:58 -0800
commitda69355f30ca6863cc07c0aebffc5a14900de265 (patch)
tree83c866fcf54b2c058d452312109175cbb2107865 /test/core/handshake/client_ssl.cc
parent5e1298f0a826777b0e5b844328b81216e9c37476 (diff)
C++ize gpr_thread as grpc_core::Thread, make it 2-phase init (construct/Start)
Diffstat (limited to 'test/core/handshake/client_ssl.cc')
-rw-r--r--test/core/handshake/client_ssl.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc
index 2581eb525c..8ac763ac4b 100644
--- a/test/core/handshake/client_ssl.cc
+++ b/test/core/handshake/client_ssl.cc
@@ -35,7 +35,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-#include "src/core/lib/gpr/thd.h"
+#include "src/core/lib/gprpp/thd.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -230,9 +230,11 @@ static bool client_ssl_test(char* server_alpn_preferred) {
GPR_ASSERT(server_socket > 0 && port > 0);
// Launch the TLS server thread.
- gpr_thd_id thdid;
server_args args = {server_socket, server_alpn_preferred};
- GPR_ASSERT(gpr_thd_new(&thdid, "grpc_client_ssl_test", server_thread, &args));
+ bool ok;
+ grpc_core::Thread thd("grpc_client_ssl_test", server_thread, &args, &ok);
+ GPR_ASSERT(ok);
+ thd.Start();
// Load key pair and establish client SSL credentials.
grpc_ssl_pem_key_cert_pair pem_key_cert_pair;
@@ -300,7 +302,7 @@ static bool client_ssl_test(char* server_alpn_preferred) {
grpc_slice_unref(key_slice);
grpc_slice_unref(ca_slice);
- gpr_thd_join(thdid);
+ thd.Join();
grpc_shutdown();