aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/timer_manager.cc
diff options
context:
space:
mode:
authorGravatar Dave MacLachlan <dmaclach@gmail.com>2017-11-29 16:25:10 -0800
committerGravatar Dave MacLachlan <dmaclach@gmail.com>2017-11-29 16:25:10 -0800
commitaf5c54de9cdf3a8ac27aa428571d98a93f32cc1f (patch)
tree5ba4015c5d815aa9652efe44e95d6afd9b430090 /src/core/lib/iomgr/timer_manager.cc
parentc99a3ca415fcf5581f9c365e4dc3004e858fc76a (diff)
Add thread naming support on platforms that support it.
As a client of grpc I want to be aware of which threads are being created by grpc, and giving them recognizable names makes it significantly easier to diagnose what is going on in my programs. This provides thread names for macOS and Linux. Adding support for other platforms should be easy for platform specialists.
Diffstat (limited to 'src/core/lib/iomgr/timer_manager.cc')
-rw-r--r--src/core/lib/iomgr/timer_manager.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc
index dac74aea24..0e68637fa4 100644
--- a/src/core/lib/iomgr/timer_manager.cc
+++ b/src/core/lib/iomgr/timer_manager.cc
@@ -93,7 +93,7 @@ static void start_timer_thread_and_unlock(void) {
// to leak through g_completed_threads and be freed in gc_completed_threads()
// before "&ct->t" is written to, causing a use-after-free.
gpr_mu_lock(&g_mu);
- gpr_thd_new(&ct->t, timer_thread, ct, &opt);
+ gpr_thd_new(&ct->t, "gpr_timer", timer_thread, ct, &opt);
gpr_mu_unlock(&g_mu);
}