[geary/mjog/592-workaround-glib-deadlock] Workaround type initialisation deadlock in GObject



commit c85a89eb480dc3b140499f787bd4440ca8aa52fc
Author: Michael Gratton <mike vee net>
Date:   Sun Feb 2 21:03:34 2020 +1100

    Workaround type initialisation deadlock in GObject
    
    Ensure some types that are prone to deadlocking are initialised up
    front.
    
    Workaround for GNOME/geary#592 GNOME/glib#541

 src/engine/api/geary-engine.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/engine/api/geary-engine.vala b/src/engine/api/geary-engine.vala
index 97b86a77..3fee1063 100644
--- a/src/engine/api/geary-engine.vala
+++ b/src/engine/api/geary-engine.vala
@@ -41,6 +41,10 @@ public class Geary.Engine : BaseObject {
 
     private static bool is_initialized = false;
 
+    static construct {
+        // Work around GNOME/glib#541
+        typeof(Imap.MailboxAttributes).name();
+    }
 
     // This can't be called from within the ctor, as initialization
     // code may want to access the Engine instance to make their own


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