From 175ca9ba157ecf6f75445197d83deda42ebfe4b8 Mon Sep 17 00:00:00 2001 From: Paolo Molaro Date: Wed, 10 Nov 2010 10:37:00 +0100 Subject: [PATCH] Set the name of some runtime threads. * gc.c: set the name of the finalizer thread. * threadpool.c: set the name of the threadpool worker threads. --- mono/metadata/gc.c | 1 + mono/metadata/threadpool.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c index 10f0976175b..9d708638957 100644 --- a/mono/metadata/gc.c +++ b/mono/metadata/gc.c @@ -1108,6 +1108,7 @@ mono_gc_init (void) #endif gc_thread = mono_thread_create_internal (mono_domain_get (), finalizer_thread, NULL, FALSE); + ves_icall_System_Threading_Thread_SetName_internal (gc_thread, mono_string_new (mono_domain_get (), "Finalizer")); } void diff --git a/mono/metadata/threadpool.c b/mono/metadata/threadpool.c index ae687a62bd1..ba5f090bd40 100644 --- a/mono/metadata/threadpool.c +++ b/mono/metadata/threadpool.c @@ -1253,6 +1253,7 @@ monitor_thread (gpointer data) tp = data; thread = mono_thread_internal_current (); + ves_icall_System_Threading_Thread_SetName_internal (thread, mono_string_new (mono_domain_get (), "Threapool monitor")); while (1) { ms = 500; do { @@ -1935,6 +1936,7 @@ async_invoke_thread (gpointer data) thread = mono_thread_internal_current (); mono_profiler_thread_start (thread->tid); + ves_icall_System_Threading_Thread_SetName_internal (thread, mono_string_new (mono_domain_get (), "Threapool worker")); if (tp_start_func) tp_start_func (tp_hooks_user_data); -- 2.25.1