From 81b0b232e1a840457aaa2be28cd1c22879b065d8 Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Tue, 25 Oct 2022 19:00:41 -0500 Subject: [PATCH] LibThreading: Set BackgroundAction's thread name correctly Previously, init() in BackgroundAction.cpp was calling Core::Object::set_name, which does not affect the displayed thread name which is displayed by the system monitor. This changes it to pass the name to the thread constructor. --- Userland/Libraries/LibThreading/BackgroundAction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Libraries/LibThreading/BackgroundAction.cpp b/Userland/Libraries/LibThreading/BackgroundAction.cpp index 0f7330c855..a46a5f7482 100644 --- a/Userland/Libraries/LibThreading/BackgroundAction.cpp +++ b/Userland/Libraries/LibThreading/BackgroundAction.cpp @@ -41,8 +41,7 @@ static intptr_t background_thread_func() static void init() { s_all_actions = new Queue>; - s_background_thread = &Threading::Thread::construct(background_thread_func).leak_ref(); - s_background_thread->set_name("Background thread"); + s_background_thread = &Threading::Thread::construct(background_thread_func, "Background Thread"sv).leak_ref(); s_background_thread->start(); }