Allow setting the name of threadpool threads. Fixes #4269.
[mono.git] / mono / metadata / threadpool.c
index db6243b2133d2ca20b41d809a4321f74b78b74f2..47c39e683a1dabee1ea6476c5a05aec7560a3f25 100644 (file)
@@ -1374,7 +1374,7 @@ async_invoke_thread (gpointer data)
 
        mono_profiler_thread_start (thread->tid);
        name = (tp->is_io) ? "IO Threadpool worker" : "Threadpool worker";
-       ves_icall_System_Threading_Thread_SetName_internal (thread, mono_string_new (mono_domain_get (), name));
+       mono_thread_set_name_internal (thread, mono_string_new (mono_domain_get (), name), FALSE);
 
        if (tp_start_func)
                tp_start_func (tp_hooks_user_data);