[gjs/wip/3v1n0/use-timeout-seconds] context: use timeout with seconds to schedule a gc trigger
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/3v1n0/use-timeout-seconds] context: use timeout with seconds to schedule a gc trigger
- Date: Mon, 8 Oct 2018 14:19:16 +0000 (UTC)
commit 0fb9228d97fe574643276e53bb00d2cdaadea262
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]