[gnome-photos/wip/rishi/thumbnailer: 7/8] base-item: Force load_buffer_async to return as soon as it's cancelled
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/thumbnailer: 7/8] base-item: Force load_buffer_async to return as soon as it's cancelled
- Date: Sun, 26 Feb 2017 12:10:22 +0000 (UTC)
commit 6a68b1a05f575134165a9909c85910aa7f62e79c
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Feb 26 13:00:28 2017 +0100
base-item: Force load_buffer_async to return as soon as it's cancelled
Since gegl:load isn't interruptible, we need to resort to the GTask's
return-on-cancel flag to have a cancellable wrapper around.
https://bugzilla.gnome.org/show_bug.cgi?id=777867
src/photos-base-item.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 7350853..5c6f12f 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1421,6 +1421,7 @@ photos_base_item_load_buffer_async (PhotosBaseItem *self,
g_return_if_fail (PHOTOS_IS_BASE_ITEM (self));
task = g_task_new (self, cancellable, callback, user_data);
+ g_task_set_return_on_cancel (task, TRUE);
g_task_set_source_tag (task, photos_base_item_load_buffer_async);
g_task_run_in_thread (task, photos_base_item_load_buffer_in_thread_func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]