mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
fix deadlock at exit on SMP systems
graph process-threads won't terminate properly while active.
This commit is contained in:
parent
212a4c1f8d
commit
2e38cb81fe
1 changed files with 11 additions and 1 deletions
|
|
@ -863,10 +863,20 @@ AudioEngine::stop (bool for_latency)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Glib::Threads::Mutex::Lock pl (_process_lock, Glib::Threads::NOT_LOCK);
|
||||||
|
|
||||||
|
if (running()) {
|
||||||
|
pl.acquire ();
|
||||||
|
}
|
||||||
|
|
||||||
if (_backend->stop ()) {
|
if (_backend->stop ()) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pl.locked ()) {
|
||||||
|
pl.release ();
|
||||||
|
}
|
||||||
|
|
||||||
if (_session && _running &&
|
if (_session && _running &&
|
||||||
(_session->state_of_the_state() & Session::Loading) == 0 &&
|
(_session->state_of_the_state() & Session::Loading) == 0 &&
|
||||||
(_session->state_of_the_state() & Session::Deletion) == 0) {
|
(_session->state_of_the_state() & Session::Deletion) == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue