diff options
author | Robin Gareus <robin@gareus.org> | 2016-06-02 19:33:39 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-06-02 22:25:41 +0200 |
commit | 8566d898b5249df22f06d8954f5633a28c9b8e5e (patch) | |
tree | edfe6fe1351dc7c6e35c40cadd797d12a7a4e73a /libs/ardour/route.cc | |
parent | 1af8b564b438bb22a450b9e0d37b98a1a66303b8 (diff) |
fix possible deadlock replacing processor state.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 5f98fba1fe..5a0959f8bb 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2826,9 +2826,14 @@ Route::set_processor_state (const XMLNode& node) } { - Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); Glib::Threads::RWLock::WriterLock lm (_processor_lock); + /* re-assign _processors w/o process-lock. + * if there's an IO-processor present in _processors but + * not in new_order, it will be deleted and ~IO takes + * a process lock. + */ _processors = new_order; + Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ()); if (must_configure) { configure_processors_unlocked (0, &lm); |