add required virtual method for SrcFileSource
[ardour.git] / libs / pbd / event_loop.cc
index 6950c045ff0fba82e6232bcaa08e73b07d25cc56..b6888f0f7d09b0c9e0e96dccc9f17814f476ce9d 100644 (file)
@@ -1,13 +1,32 @@
+/*
+    Copyright (C) 2012 Paul Davis 
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
 #include "pbd/event_loop.h"
 #include "pbd/stacktrace.h"
 
 using namespace PBD;
 using namespace std;
 
-Glib::StaticPrivate<EventLoop> EventLoop::thread_event_loop;
-
 static void do_not_delete_the_loop_pointer (void*) { }
 
+Glib::Threads::Private<EventLoop> EventLoop::thread_event_loop (do_not_delete_the_loop_pointer); 
+
 EventLoop* 
 EventLoop::get_event_loop_for_thread() {
        return thread_event_loop.get ();
@@ -16,7 +35,7 @@ EventLoop::get_event_loop_for_thread() {
 void 
 EventLoop::set_event_loop_for_thread (EventLoop* loop) 
 {
-       thread_event_loop.set (loop, do_not_delete_the_loop_pointer); 
+       thread_event_loop.set (loop);
 }
 
 void* 
@@ -49,7 +68,7 @@ EventLoop::invalidate_request (void* data)
         */
        
         if (ir->event_loop) {
-               Glib::Mutex::Lock lm (ir->event_loop->slot_invalidation_mutex());
+               Glib::Threads::Mutex::Lock lm (ir->event_loop->slot_invalidation_mutex());
                for (list<BaseRequestObject*>::iterator i = ir->requests.begin(); i != ir->requests.end(); ++i) {
                        (*i)->valid = false;
                        (*i)->invalidation = 0;