aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/profiling
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-03-01 11:36:47 -0800
committerGravatar Vijay Pai <vpai@google.com>2018-03-01 11:47:36 -0800
commit2fe87b09055cd256cdce038c4c70d92b955c991b (patch)
treea7652e9285797130e4d4ece7a6f271530be4b14f /src/core/lib/profiling
parent8ffa1ae93310646cdf1b15c3a8c2655268d1a47f (diff)
Move assignment for Thread, make destructor optional, loop cv waits
Diffstat (limited to 'src/core/lib/profiling')
-rw-r--r--src/core/lib/profiling/basic_timers.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/profiling/basic_timers.cc b/src/core/lib/profiling/basic_timers.cc
index 97646d1000..43384fd0ca 100644
--- a/src/core/lib/profiling/basic_timers.cc
+++ b/src/core/lib/profiling/basic_timers.cc
@@ -183,7 +183,7 @@ static void finish_writing(void) {
pthread_cond_signal(&g_cv);
pthread_mutex_unlock(&g_mu);
g_writing_thread->Join();
- delete g_writing_thread;
+ grpc_core::Delete(g_writing_thread);
gpr_log(GPR_INFO, "flushing logs");
@@ -202,8 +202,8 @@ void gpr_timers_set_log_filename(const char* filename) {
}
static void init_output() {
- g_writing_thread =
- new grpc_core::Thread("timer_output_thread", writing_thread, nullptr);
+ g_writing_thread = grpc_core::New<grpc_core::Thread>("timer_output_thread",
+ writing_thread, nullptr);
atexit(finish_writing);
}