more inter-thread progress fixes; slight change of semantics:
authorRobin Gareus <robin@gareus.org>
Tue, 24 May 2016 01:27:27 +0000 (03:27 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 24 May 2016 01:33:08 +0000 (03:33 +0200)
Background thread now *must* set "done" as last step. (they already do
since various error conditions don't result in "done")

This fixes a race: background thread Session::write_one_track() sets "done"
to true. Editor::freeze_route () continues, sets current_interthread_info
to NULL. thread continues and tries to set current_interthread_info.done
before terminating -> Crash.

This also ensures that singleton threads created with
"pthread_create_and_store" remain unique.

libs/ardour/session.cc

index 98d9d1dfd930ec2828f0274f332e618ddb0029d2..4097335f5b811138e035e9f654f89cdc4523fec3 100644 (file)
@@ -5919,7 +5919,6 @@ Session::write_one_track (Track& track, framepos_t start, framepos_t end,
        }
 
        unblock_processing ();
-       itt.done = true;
 
        return result;
 }