mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
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.
This commit is contained in:
parent
0c27d95e76
commit
81b0b232e1
Notes:
sideshowbarker
2024-07-17 22:01:16 +09:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/SerenityOS/serenity/commit/81b0b232e1 Pull-request: https://github.com/SerenityOS/serenity/pull/15839
1 changed files with 1 additions and 2 deletions
|
@ -41,8 +41,7 @@ static intptr_t background_thread_func()
|
|||
static void init()
|
||||
{
|
||||
s_all_actions = new Queue<Function<void()>>;
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue