added RCU handling of Session route list, and major use of shared_ptr<T> everywhere...
[ardour.git] / libs / ardour / session_export.cc
index ddced9cc5f85f169169d036a6c2f25f11647747e..ad8ce7c40759992cbeb4d008d13ee08c70dd8780 100644 (file)
@@ -485,8 +485,9 @@ Session::prepare_to_export (AudioExportSpecification& spec)
        /* take everyone out of awrite to avoid disasters */
 
        {
-               Glib::RWLock::ReaderLock lm (route_lock);
-               for (RouteList::iterator i = routes.begin(); i != routes.end(); ++i) {
+               boost::shared_ptr<RouteList> r = routes.reader ();
+
+               for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
                        (*i)->protect_automation ();
                }
        }