Replace Glib::Threads with PBD::Thread (2/2)

This commit is contained in:
Robin Gareus 2022-02-28 22:34:02 +01:00
parent 24bbf403b9
commit 50abcc74b5
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 13 additions and 14 deletions

View file

@ -96,10 +96,9 @@ UI::UI (string application_name, string thread_name, int *argc, char ***argv)
}
/* the GUI event loop runs in the main thread of the app,
which is assumed to have called this.
*/
run_loop_thread = Threads::Thread::self();
* which is assumed to have called this.
*/
_run_loop_thread = PBD::Thread::self ();
/* store "this" as the UI-for-thread of this thread, same argument
as for previous line.
@ -144,9 +143,9 @@ UI::~UI ()
}
bool
UI::caller_is_ui_thread ()
UI::caller_is_ui_thread () const
{
return Threads::Thread::self() == run_loop_thread;
return caller_is_self ();
}
int