mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
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:
parent
638af32902
commit
e417495505
1 changed files with 2 additions and 1 deletions
|
|
@ -119,11 +119,12 @@ BaseUI::run ()
|
||||||
|
|
||||||
m_context = MainContext::create();
|
m_context = MainContext::create();
|
||||||
_main_loop = MainLoop::create (m_context);
|
_main_loop = MainLoop::create (m_context);
|
||||||
attach_request_source ();
|
|
||||||
|
|
||||||
Glib::Threads::Mutex::Lock lm (_run_lock);
|
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));
|
||||||
_running.wait (_run_lock);
|
_running.wait (_run_lock);
|
||||||
|
|
||||||
|
attach_request_source ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue