summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-05-03 13:56:08 +0200
committerRobin Gareus <robin@gareus.org>2016-05-03 14:27:52 +0200
commit4c40fe8d042a7987ea17763210dbdad8de64fb2a (patch)
treec2437ff56ae9fbe8cacb4be1479a965a5d488a58 /libs/ardour/session.cc
parent433f18049b08ebfd486fd33e5e7696b2ce5ac3fb (diff)
another (non critical) concurrency issue:
Ignore latency-updates while removing tracks. remove_tracks() calls disconnect_all() which can trigger the backend to perform a latency-recompute in a different thread (process thread). That calls Session::update_latency() which iterates over all routes including the one(s) to be deleted. At the same time disconnect_all() may propagate Port::PostDisconnect() leading to a lock contention. (no crash just a lot of unnecessary work. remove_routes() calls update_latency_compensation() which triggers a recompute if needed)
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 68c7d3957f..718b68279d 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -6403,9 +6403,10 @@ Session::unknown_processors () const
void
Session::update_latency (bool playback)
{
+
DEBUG_TRACE (DEBUG::Latency, string_compose ("JACK latency callback: %1\n", (playback ? "PLAYBACK" : "CAPTURE")));
- if ((_state_of_the_state & (InitialConnecting|Deletion)) || _adding_routes_in_progress) {
+ if ((_state_of_the_state & (InitialConnecting|Deletion)) || _adding_routes_in_progress || _route_deletion_in_progress) {
return;
}