diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-12-19 14:35:29 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-12-19 14:36:39 +0000 |
commit | 3d1eb9a6e5250bfc2f4d0138c004a82d6186beab (patch) | |
tree | 20104d2cc64d98ed51a403673edf62ff7c7622f8 /libs/ardour/session.cc | |
parent | ae6a5c95d73a1f1b32e0939942e9843e20a9fb03 (diff) |
Session::auto_connect_thread_terminate() cannot use ::auto_connect_thread_wakeup() because that method is allowed to "fail".
Should fix hangs when closing a session with the ALSA backend (and perhaps others too).
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 33cd651dcc..b9d78494a3 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -7024,7 +7024,13 @@ Session::auto_connect_thread_terminate () } } - auto_connect_thread_wakeup (); + /* cannot use auto_connect_thread_wakeup() because that is allowed to + * fail to wakeup the thread. + */ + + pthread_mutex_lock (&_auto_connect_mutex); + pthread_cond_signal (&_auto_connect_cond); + pthread_mutex_unlock (&_auto_connect_mutex); void *status; pthread_join (_auto_connect_thread, &status); |