[gnome-photos/gnome-3-22] 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/gnome-3-22] base-item: Force load_buffer_async to return as soon as it's cancelled
- Date: Tue, 28 Feb 2017 10:10:22 +0000 (UTC)
commit 0112a3d4e846cb57697d75cddf2f030af5035d5e
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 b901151..5d8d27b 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1348,6 +1348,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]