Fix possible race (BaseUI creation vs x-thread signal-emission)

When a BaseUI is being created, signals can arrive before the
_run_loop_thread is running, which can trigger an assert in
BaseUI::caller_is_self().
This commit is contained in:
Robin Gareus 2022-03-01 17:18:14 +01:00
parent 638af32902
commit e417495505
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -119,11 +119,12 @@ BaseUI::run ()
m_context = MainContext::create();
_main_loop = MainLoop::create (m_context);
attach_request_source ();
Glib::Threads::Mutex::Lock lm (_run_lock);
_run_loop_thread = PBD::Thread::create (boost::bind (&BaseUI::main_thread, this));
_running.wait (_run_lock);
attach_request_source ();
}
void