Revert "Bug #683867 - Schedule actions with higher idle priority"
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 8 Feb 2013 12:01:49 +0000 (07:01 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Fri, 8 Feb 2013 12:01:49 +0000 (07:01 -0500)
This reverts commit 224e8bed43ea13e34adbeef786a0d60f848bb170.

The commit contains not a single comment as to why these custom priority
values are being used.  The rationale needs to be documented in the code,
either at each call point or preferably at a centralized priority value
definition.

calendar/libecal/e-cal.c
camel/camel-folder.c
camel/camel-imapx-server.c
camel/camel-service.c
camel/camel-session.c
camel/camel-store.c
camel/camel-subscribable.c
libedataserver/e-gdbus-templates.c

index d108828..94ed245 100644 (file)
@@ -726,7 +726,7 @@ async_report_idle (ECal *ecal,
        data->ecal = g_object_ref (ecal);
        data->error = error;
 
-       g_idle_add_full (G_PRIORITY_DEFAULT, idle_async_error_reply_cb, data, NULL);
+       g_idle_add (idle_async_error_reply_cb, data);
 }
 
 /**
index 3464d0a..ad3bec2 100644 (file)
@@ -2887,7 +2887,7 @@ camel_folder_search_free (CamelFolder *folder,
  * Marks @folder as deleted and performs any required cleanup.
  *
  * This also emits the #CamelFolder::deleted signal from an idle source on
- * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  **/
 void
 camel_folder_delete (CamelFolder *folder)
@@ -2928,7 +2928,7 @@ camel_folder_delete (CamelFolder *folder)
        signal_data->folder = g_object_ref (folder);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                folder_emit_deleted_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
@@ -2941,7 +2941,7 @@ camel_folder_delete (CamelFolder *folder)
  * Marks @folder as renamed.
  *
  * This also emits the #CamelFolder::renamed signal from an idle source on
- * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  *
  * NOTE: This is an internal function used by camel stores, no locking
  * is performed on the folder.
@@ -2978,7 +2978,7 @@ camel_folder_rename (CamelFolder *folder,
        signal_data->folder_name = old_name;  /* transfer ownership */
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                folder_emit_renamed_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
index 26544aa..d106189 100644 (file)
@@ -6903,7 +6903,7 @@ imapx_server_dispose (GObject *object)
 
        if (server->parser_thread) {
                if (server->parser_thread == g_thread_self ())
-                       g_idle_add_full (G_PRIORITY_HIGH, &join_helper, server->parser_thread, NULL);
+                       g_idle_add (&join_helper, server->parser_thread);
                else
                        g_thread_join (server->parser_thread);
                server->parser_thread = NULL;
index 5cf9e92..3250b6a 100644 (file)
@@ -409,7 +409,7 @@ service_queue_notify_connection_status (CamelService *service)
        session = camel_service_get_session (service);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                service_notify_connection_status_cb,
                g_object_ref (service),
                (GDestroyNotify) g_object_unref);
index df6f254..ffbf661 100644 (file)
@@ -53,7 +53,7 @@
        (G_TYPE_INSTANCE_GET_PRIVATE \
        ((obj), CAMEL_TYPE_SESSION, CamelSessionPrivate))
 
-#define JOB_PRIORITY G_PRIORITY_DEFAULT
+#define JOB_PRIORITY G_PRIORITY_LOW
 
 #define d(x)
 
index b81c372..2051162 100644 (file)
@@ -1257,7 +1257,7 @@ G_DEFINE_QUARK (camel-store-error-quark, camel_store_error)
  * @folder_info: information about the created folder
  *
  * Emits the #CamelStore::folder-created signal from an idle source on
- * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  *
  * This function is only intended for Camel providers.
  *
@@ -1280,7 +1280,7 @@ camel_store_folder_created (CamelStore *store,
        signal_data->folder_info = camel_folder_info_clone (folder_info);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                store_emit_folder_created_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
@@ -1291,7 +1291,7 @@ camel_store_folder_created (CamelStore *store,
  * @folder_info: information about the deleted folder
  *
  * Emits the #CamelStore::folder-deleted signal from an idle source on
- * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  *
  * This function is only intended for Camel providers.
  *
@@ -1314,7 +1314,7 @@ camel_store_folder_deleted (CamelStore *store,
        signal_data->folder_info = camel_folder_info_clone (folder_info);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                store_emit_folder_deleted_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
@@ -1325,7 +1325,7 @@ camel_store_folder_deleted (CamelStore *store,
  * @folder: the #CamelFolder that was opened
  *
  * Emits the #CamelStore::folder-opened signal from an idle source on
- * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  *
  * This function is only intended for Camel providers.
  *
@@ -1348,7 +1348,7 @@ camel_store_folder_opened (CamelStore *store,
        signal_data->folder = g_object_ref (folder);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                store_emit_folder_opened_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
@@ -1360,7 +1360,7 @@ camel_store_folder_opened (CamelStore *store,
  * @folder_info: information about the renamed folder
  *
  * Emits the #CamelStore::folder-renamed signal from an idle source on
- * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  *
  * This function is only intended for Camel providers.
  *
@@ -1386,7 +1386,7 @@ camel_store_folder_renamed (CamelStore *store,
        signal_data->folder_name = g_strdup (old_name);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                store_emit_folder_renamed_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
index b73395e..ceb18d0 100644 (file)
@@ -611,7 +611,7 @@ camel_subscribable_unsubscribe_folder_finish (CamelSubscribable *subscribable,
  * @folder_info: information about the subscribed folder
  *
  * Emits the #CamelSubscribable::folder-subscribed signal from an idle source
- * on the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * on the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  *
  * This function is only intended for Camel providers.
  *
@@ -636,7 +636,7 @@ camel_subscribable_folder_subscribed (CamelSubscribable *subscribable,
        signal_data->folder_info = camel_folder_info_clone (folder_info);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                subscribable_emit_folder_subscribed_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
@@ -647,7 +647,7 @@ camel_subscribable_folder_subscribed (CamelSubscribable *subscribable,
  * @folder_info: information about the unsubscribed folder
  *
  * Emits the #CamelSubscribable::folder-unsubscribed signal from an idle source
- * on the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT.
+ * on the main loop.  The idle source's priority is #G_PRIORITY_DEFAULT_IDLE.
  *
  * This function is only intended for Camel providers.
  *
@@ -672,7 +672,7 @@ camel_subscribable_folder_unsubscribed (CamelSubscribable *subscribable,
        signal_data->folder_info = camel_folder_info_clone (folder_info);
 
        camel_session_idle_add (
-               session, G_PRIORITY_DEFAULT,
+               session, G_PRIORITY_DEFAULT_IDLE,
                subscribable_emit_folder_unsubscribed_cb,
                signal_data, (GDestroyNotify) signal_data_free);
 }
index 5d99703..ef3e476 100644 (file)
@@ -1015,7 +1015,7 @@ e_gdbus_op_cancelled_cb (GCancellable *cancellable,
 
        /* do this on idle, because this callback should be left
         * as soon as possible, with no sync calls being done */
-       op_data->cancel_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT, e_gdbus_op_cancelled_idle_cb, cd, cancel_data_free);
+       op_data->cancel_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, e_gdbus_op_cancelled_idle_cb, cd, cancel_data_free);
 }
 
 static void