[glibmm] Thread::RecMutex: Don't initialize this as a GStaticMutex.



commit f0922e07e760b6b6ae3dca14609e35e31b27716b
Author: MichaÅ WrÃbel <michal wrobel flytronic pl>
Date:   Fri Jun 1 17:45:37 2012 +0200

    Thread::RecMutex: Don't initialize this as a GStaticMutex.
    
    The previous code (removed here) depended on an implementation
    detail of GStaticRecMutex, which was changed in this glib commit:
    http://git.gnome.org/browse/glib/commit/?id=2b281e40f32b7916d856dcc95e6f8fe625fcff03
    
    This change avoids a deadlock with that version of glib.
    Note that Thread::* is deprecated anyway, which is lucky because we do not
    know for sure that this fix is enough.
    Bug #677291

 ChangeLog           |   13 +++++++++++++
 glib/src/thread.ccg |    4 ----
 2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 736e6af..e04505b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-06-08  MichaÅ WrÃbel  <michal wrobel flytronic pl>
+
+	Thread::RecMutex: Don't initialize this as a GStaticMutex.
+
+	The previous code (removed here) depended on an implementation
+	detail of GStaticRecMutex, which was changed in this glib commit:
+	http://git.gnome.org/browse/glib/commit/?id=2b281e40f32b7916d856dcc95e6f8fe625fcff03
+
+	This change avoids a deadlock with that version of glib.
+	Note that Thread::* is deprecated anyway, which is lucky because we do not
+	know for sure that this fix is enough.
+	Bug #677291
+
 2012-06-04  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
 	Glib::add_exception_handler(): Fix misplaced endif.
diff --git a/glib/src/thread.ccg b/glib/src/thread.ccg
index 990ec6b..1c32547 100644
--- a/glib/src/thread.ccg
+++ b/glib/src/thread.ccg
@@ -286,10 +286,6 @@ StaticRecMutex::operator RecMutex&()
 RecMutex::RecMutex()
 {
   g_static_rec_mutex_init(&gobject_);
-
-  // GLib doesn't have GRecMutex, only GStaticRecMutex.  Force initialization
-  // of the mutex now, to mimic the behaviour of a (hypothetical) GRecMutex.
-  g_static_mutex_get_mutex(&gobject_.mutex);
 }
 
 RecMutex::~RecMutex()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]