[gnome-software: 5/9] icons: Set worker thread job priorities based on job interactivity
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 5/9] icons: Set worker thread job priorities based on job interactivity
- Date: Tue, 29 Mar 2022 06:22:30 +0000 (UTC)
commit fa0660d5ea98bfcfdd268b1a024aa9f914fe9b17
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Mar 28 15:30:51 2022 +0100
icons: Set worker thread job priorities based on job interactivity
See the preceding commits for details.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
plugins/core/gs-plugin-icons.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/core/gs-plugin-icons.c b/plugins/core/gs-plugin-icons.c
index 567fdfa89..3a11646ca 100644
--- a/plugins/core/gs-plugin-icons.c
+++ b/plugins/core/gs-plugin-icons.c
@@ -174,6 +174,7 @@ gs_plugin_icons_refine_async (GsPlugin *plugin,
{
GsPluginIcons *self = GS_PLUGIN_ICONS (plugin);
g_autoptr(GTask) task = NULL;
+ gboolean interactive = gs_plugin_has_flags (GS_PLUGIN (self), GS_PLUGIN_FLAGS_INTERACTIVE);
task = gs_plugin_refine_data_new_task (plugin, list, flags, cancellable, callback, user_data);
g_task_set_source_tag (task, gs_plugin_icons_refine_async);
@@ -185,7 +186,7 @@ gs_plugin_icons_refine_async (GsPlugin *plugin,
}
/* Queue a job for the refine. */
- gs_worker_thread_queue (self->worker, G_PRIORITY_DEFAULT,
+ gs_worker_thread_queue (self->worker, interactive ? G_PRIORITY_DEFAULT : G_PRIORITY_LOW,
refine_thread_cb, g_steal_pointer (&task));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]