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.
}
unblock_processing ();
- itt.done = true;
return result;
}