[gnome-builder/wip/chergert/jsonrpc-gvariant] jsonrpc: set task priority



commit 004fba4f691c2ae40d277d923edf1d8b07a276d0
Author: Christian Hergert <chergert redhat com>
Date:   Sat Mar 18 00:06:04 2017 -0700

    jsonrpc: set task priority
    
    We want this to be lower priority than the default GTK UI.

 contrib/jsonrpc-glib/jsonrpc-input-stream.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/contrib/jsonrpc-glib/jsonrpc-input-stream.c b/contrib/jsonrpc-glib/jsonrpc-input-stream.c
index 6d68196..1dfa8ef 100644
--- a/contrib/jsonrpc-glib/jsonrpc-input-stream.c
+++ b/contrib/jsonrpc-glib/jsonrpc-input-stream.c
@@ -270,11 +270,12 @@ jsonrpc_input_stream_read_message_async (JsonrpcInputStream  *self,
 
   state = g_slice_new0 (ReadState);
   state->content_length = -1;
-  state->priority = G_PRIORITY_DEFAULT;
+  state->priority = G_PRIORITY_LOW;
 
   task = g_task_new (self, cancellable, callback, user_data);
   g_task_set_source_tag (task, jsonrpc_input_stream_read_message_async);
   g_task_set_task_data (task, state, read_state_free);
+  g_task_set_priority (task, state->priority);
 
   g_data_input_stream_read_line_async (G_DATA_INPUT_STREAM (self),
                                        state->priority,


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