+ DEBUG_TRACE (DEBUG::EventLoop, string_compose ("%1: event loop running in thread %2\n", name(), pthread_name()));
+ set_event_loop_for_thread (this);
+ thread_init ();
+ _main_loop->get_context()->signal_idle().connect (sigc::mem_fun (*this, &BaseUI::signal_running));
+ _main_loop->run ();
+}
+
+bool
+BaseUI::signal_running ()
+{
+ Glib::Threads::Mutex::Lock lm (_run_lock);
+ _running.signal ();
+
+ return false; // don't call it again
+}
+
+void
+BaseUI::run ()
+{
+ /* to be called by UI's that need/want their own distinct, self-created event loop thread.