[libpeas] python: Name the GC timeout



commit 2680b37802f0364b6eac1f5bf0f1f3bbb2552133
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Mar 14 12:19:50 2014 +0100

    python: Name the GC timeout
    
    So that it can show up with its own name in profiling outputs.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726327

 loaders/python/peas-plugin-loader-python.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 1c7daf2..2e3a4ad 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -292,8 +292,10 @@ peas_plugin_loader_python_garbage_collect (PeasPluginLoader *loader)
    */
   run_gc_protected ();
 
-  if (pyloader->priv->idle_gc == 0)
+  if (pyloader->priv->idle_gc == 0) {
     pyloader->priv->idle_gc = g_idle_add ((GSourceFunc) run_gc, pyloader);
+    g_source_set_name_by_id (pyloader->priv->idle_gc, "[libpeas] run_gc");
+  }
 }
 
 /* C equivalent of


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