[libdazzle/libdazzle-3-26] search: steal task and set priority



commit 309d5d2cfc719752e5b5e0b5ecf9d9775c10d96c
Author: Christian Hergert <chergert redhat com>
Date:   Wed Nov 22 00:52:17 2017 -0800

    search: steal task and set priority

 src/search/dzl-fuzzy-index.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/search/dzl-fuzzy-index.c b/src/search/dzl-fuzzy-index.c
index 52e37ba..0bdb40c 100644
--- a/src/search/dzl-fuzzy-index.c
+++ b/src/search/dzl-fuzzy-index.c
@@ -333,6 +333,7 @@ dzl_fuzzy_index_query_async (DzlFuzzyIndex       *self,
   g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
 
   task = g_task_new (self, cancellable, callback, user_data);
+  g_task_set_priority (task, G_PRIORITY_LOW);
   g_task_set_source_tag (task, dzl_fuzzy_index_query_async);
 
   cursor = g_object_new (DZL_TYPE_FUZZY_INDEX_CURSOR,
@@ -347,7 +348,7 @@ dzl_fuzzy_index_query_async (DzlFuzzyIndex       *self,
                                G_PRIORITY_LOW,
                                cancellable,
                                dzl_fuzzy_index_query_cb,
-                               g_object_ref (task));
+                               g_steal_pointer (&task));
 }
 
 /**


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