summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-03-15 01:57:00 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-03-15 01:57:00 +0000
commitf3d8efcea968043d0b99f19fe608345e8cf034e1 (patch)
tree9c13b29bf849c57235119a6aa82224a01a26f7e5 /libs/pbd
parentf74981874f578ce5b698be7542a185d4d06b8873 (diff)
disgusting hack around mutex problem that has been delaying beta19, hopefully to be removed once we understand the issue better
git-svn-id: svn://localhost/ardour2/trunk@1591 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/pbd/mutex.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/pbd/pbd/mutex.h b/libs/pbd/pbd/mutex.h
new file mode 100644
index 0000000000..60d915fa35
--- /dev/null
+++ b/libs/pbd/pbd/mutex.h
@@ -0,0 +1,16 @@
+#include <glibmm/thread.h>
+#include <iostream>
+
+class PBDMutex : public Glib::Mutex
+{
+ public:
+ PBDMutex() : Glib::Mutex() {}
+ ~PBDMutex() {
+ if (trylock()) {
+ unlock ();
+ } else {
+ std::cerr << "Mutex @ " << this << " locked during destructor\n";
+ unlock ();
+ }
+ }
+};