mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
fix deadlock when removing monitoring-section
This commit is contained in:
parent
1b24aad933
commit
1e4e6499e3
1 changed files with 9 additions and 4 deletions
|
|
@ -1377,7 +1377,7 @@ Route::clear_processors (Placement p)
|
|||
}
|
||||
|
||||
int
|
||||
Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStreams* err, bool)
|
||||
Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStreams* err, bool need_process_lock)
|
||||
{
|
||||
// TODO once the export point can be configured properly, do something smarter here
|
||||
if (processor == _capturing_processor) {
|
||||
|
|
@ -1397,7 +1397,10 @@ Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStream
|
|||
processor_max_streams.reset();
|
||||
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
|
||||
Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock (), Glib::Threads::NOT_LOCK);
|
||||
if (need_process_lock) {
|
||||
lx.acquire();
|
||||
}
|
||||
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
|
||||
ProcessorState pstate (this);
|
||||
|
||||
|
|
@ -1457,6 +1460,9 @@ Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStream
|
|||
}
|
||||
}
|
||||
}
|
||||
if (need_process_lock) {
|
||||
lx.release();
|
||||
}
|
||||
}
|
||||
|
||||
reset_instrument_info ();
|
||||
|
|
@ -4152,8 +4158,7 @@ Route::has_external_redirects () const
|
|||
boost::shared_ptr<Processor>
|
||||
Route::the_instrument () const
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
|
||||
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
|
||||
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
|
||||
return the_instrument_unlocked ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue