[gnome-software/wip/hughsie/g_main_context_ref_thread_default] trivial: Push the thread default GMainContext for categories




commit 0468b8de9a66f5fcb0010bd86535f9394fef762f
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 7 11:29:26 2021 +0000

    trivial: Push the thread default GMainContext for categories
    
    This matches the behavior of gs_plugin_loader_process_thread_cb().

 lib/gs-plugin-loader.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 354c297e..9394cea6 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1577,6 +1577,8 @@ gs_plugin_loader_job_get_categories_thread_cb (GTask *task,
 {
        GError *error = NULL;
        GsPluginLoaderHelper *helper = (GsPluginLoaderHelper *) task_data;
+       g_autoptr(GMainContext) context = g_main_context_new ();
+       g_autoptr(GsMainContextPusher) pusher = gs_main_context_pusher_new (context);
 #ifdef HAVE_SYSPROF
        GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (helper->plugin_loader);
        gint64 begin_time_nsec G_GNUC_UNUSED = SYSPROF_CAPTURE_CURRENT_TIME;


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