[libdazzle] search: steal task and set priority
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] search: steal task and set priority
- Date: Wed, 22 Nov 2017 08:53:49 +0000 (UTC)
commit 718036d7eb3aaa54f67ece8a2a28706727c9a694
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 4c00c1e..d8a2fe9 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]