[gnome-software: 6/9] rewrite-resource: 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: 6/9] rewrite-resource: Set worker thread job priorities based on job interactivity
- Date: Tue, 29 Mar 2022 06:22:30 +0000 (UTC)
commit 130271fd1fa740460ac9c40dff00cd8c4527c6e0
Author: Philip Withnall <pwithnall endlessos org>
Date: Mon Mar 28 15:31:07 2022 +0100
rewrite-resource: 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-rewrite-resource.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/core/gs-plugin-rewrite-resource.c b/plugins/core/gs-plugin-rewrite-resource.c
index b52227bae..44348c5ca 100644
--- a/plugins/core/gs-plugin-rewrite-resource.c
+++ b/plugins/core/gs-plugin-rewrite-resource.c
@@ -184,12 +184,13 @@ gs_plugin_rewrite_resource_refine_async (GsPlugin *plugin,
{
GsPluginRewriteResource *self = GS_PLUGIN_REWRITE_RESOURCE (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_rewrite_resource_refine_async);
/* 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]