[pango/fix-deadlocks2: 2/2] Fix hangs that people have observed




commit da95f6366c5ca516d352f9dce37cbbfc355e400c
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 31 16:21:55 2021 -0400

    Fix hangs that people have observed
    
    We were erroneously setting fc_initialized back to 1
    in one place. But now 1 means 'wait for the FcInit thread
    that is already underway. Setting it to 2 restores the
    intention.

 pango/pangofc-fontmap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 813b6c78..7966a8cd 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -1372,7 +1372,6 @@ start_init_in_thread (PangoFcFontMap *fcfontmap)
       GTask *task;
 
       fc_initialized = 1;
-
       task = g_task_new (fcfontmap, NULL, NULL, NULL);
       g_task_set_name (task, "[pango] FcInit");
       g_task_run_in_thread (task, init_in_thread);
@@ -2333,7 +2332,7 @@ pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
     FcConfigDestroy (oldconfig);
 
   /* No need to wait anymore */
-  fc_initialized = TRUE;
+  fc_initialized = 2;
 }
 
 /**


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