fix deadlock when removing monitoring-section
This commit is contained in:
parent
a08e7c0016
commit
35ab234e5e
@ -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 ();
|
||||
@ -4147,8 +4153,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…
Reference in New Issue
Block a user