[gjs/gnome-3-30] context: use timeout with seconds to schedule a gc trigger



commit e3f6208a2e550a1e3a0a7bd5a5d2a53bae3446f7
Author: Marco Trevisan <mail 3v1n0 net>
Date:   Mon Oct 8 14:18:58 2018 +0000

    context: use timeout with seconds to schedule a gc trigger
    
    We can use lower granularity as we care about seconds anyway

 gjs/context.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gjs/context.cpp b/gjs/context.cpp
index d07213ee..ab16ad1e 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -636,10 +636,9 @@ _gjs_context_schedule_gc_internal(GjsContext *js_context,
     if (js_context->auto_gc_id > 0)
         return;
 
-    js_context->auto_gc_id = g_timeout_add_full(G_PRIORITY_LOW,
-                                                10000,
-                                                trigger_gc_if_needed,
-                                                js_context, NULL);
+    js_context->auto_gc_id = g_timeout_add_seconds_full(G_PRIORITY_LOW, 10,
+                                                        trigger_gc_if_needed,
+                                                        js_context, NULL);
 }
 
 void


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