From da087e920b32d2b55044e337becff9f15524c060 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 14 Jan 2016 09:04:09 -0500 Subject: ensure that each and every audioengine-related thread has a unique name --- libs/ardour/audioengine.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libs/ardour/audioengine.cc') diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 9c8407e8d7..07a70aebc9 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -63,6 +63,8 @@ using namespace PBD; AudioEngine* AudioEngine::_instance = 0; +static gint audioengine_thread_cnt = 1; + #ifdef SILENCE_AFTER #define SILENCE_AFTER_SECONDS 600 #endif @@ -1224,10 +1226,11 @@ AudioEngine::thread_init_callback (void* arg) pthread_set_name (X_("audioengine")); - SessionEvent::create_per_thread_pool (X_("AudioEngine"), 512); - - PBD::notify_event_loops_about_thread_creation (pthread_self(), X_("AudioEngine"), 4096); + const int thread_num = g_atomic_int_add (&audioengine_thread_cnt, 1); + const string thread_name = string_compose (X_("AudioEngine %1"), thread_num); + SessionEvent::create_per_thread_pool (thread_name, 512); + PBD::notify_event_loops_about_thread_creation (pthread_self(), thread_name, 4096); AsyncMIDIPort::set_process_thread (pthread_self()); if (arg) { -- cgit v1.2.3