Let PBD::Thread set thread-name

This commit is contained in:
Robin Gareus 2024-09-28 00:14:45 +02:00
parent 538a8cbccc
commit 88a24ae8e5
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
23 changed files with 13 additions and 55 deletions

View file

@ -94,7 +94,6 @@ BaseUI::set_thread_priority () const
void
BaseUI::main_thread ()
{
pthread_set_name (string_compose ("UI:%1", event_loop_name ()).c_str ());
DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: event loop running in thread %2\n", event_loop_name(), pthread_name()));
set_event_loop_for_thread (this);
thread_init ();
@ -122,7 +121,7 @@ BaseUI::run ()
attach_request_source ();
Glib::Threads::Mutex::Lock lm (_run_lock);
_run_loop_thread = PBD::Thread::create (boost::bind (&BaseUI::main_thread, this));
_run_loop_thread = PBD::Thread::create (boost::bind (&BaseUI::main_thread, this), string_compose ("UI:%1", event_loop_name ()));
_running.wait (_run_lock);
}