abstractui: don't register self as a sending thread

if thread A emits a signal that is handled by thread A, no request buffers are
involved.
This commit is contained in:
Paul Davis 2023-04-21 12:14:25 -06:00
parent 4a2c27ed6d
commit 7ad0deff10
1 changed files with 6 additions and 1 deletions

View File

@ -114,7 +114,12 @@ AbstractUI<RequestObject>::register_thread (pthread_t thread_id, string thread_n
* do so in a realtime-safe manner (no locks).
*/
DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("in %1 (thread name %4), %2 (%5) wants to register with UIs\n", event_loop_name(), thread_name, pthread_name(), DEBUG_THREAD_SELF));
if (thread_name == event_loop_name()) {
DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("%1 wanted to self-register, ignored\n", event_loop_name()));
return;
}
DEBUG_TRACE (PBD::DEBUG::AbstractUI, string_compose ("in %1 (thread name %2), [%3] (%4) wants to register with us (%1)\n", event_loop_name(), pthread_name(), thread_name, thread_id));
/* the per_thread_request_buffer is a thread-private variable.
See pthreads documentation for more on these, but the key