[almanah] core: Use the correct priority for search progress callbacks
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [almanah] core: Use the correct priority for search progress callbacks
- Date: Thu, 14 Jul 2011 07:53:06 +0000 (UTC)
commit 9a96bcdeb8eaa89943d7f4143c2840341162adaf
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Jul 14 08:51:54 2011 +0100
core: Use the correct priority for search progress callbacks
This should prevent the situation where the progress callbacks are scheduled
after the async operation's GAsyncReadyCallback.
See: bgo#647690
src/storage-manager.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/storage-manager.c b/src/storage-manager.c
index 5093670..26ffe17 100644
--- a/src/storage-manager.c
+++ b/src/storage-manager.c
@@ -1061,7 +1061,9 @@ search_entries_async_thread (GSimpleAsyncResult *result, AlmanahStorageManager *
progress_data->entry = g_object_ref (entry);
progress_data->user_data = search_data->progress_user_data;
- g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) search_entry_async_progress_cb,
+ /* We have to use G_PRIORITY_DEFAULT here to contend with the GAsyncReadyCallback for the whole search operation. All the progress
+ * callbacks must have been made before the finished callback. */
+ g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) search_entry_async_progress_cb,
progress_data, (GDestroyNotify) progress_callback_data_free);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]