[gnome-builder] makecache: be a bit more defensive with cancellables
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] makecache: be a bit more defensive with cancellables
- Date: Mon, 28 Sep 2015 00:37:47 +0000 (UTC)
commit 011b6063a09b101c70e3aaa691bdf15d97d9adb8
Author: Christian Hergert <christian hergert me>
Date: Sun Sep 27 17:37:16 2015 -0700
makecache: be a bit more defensive with cancellables
plugins/autotools/ide-makecache.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/autotools/ide-makecache.c b/plugins/autotools/ide-makecache.c
index 623ed71..0760976 100644
--- a/plugins/autotools/ide-makecache.c
+++ b/plugins/autotools/ide-makecache.c
@@ -888,6 +888,9 @@ ide_makecache_get_file_flags_worker (GTask *task,
gchar **lines;
gchar **ret = NULL;
+ if (g_cancellable_is_cancelled (cancellable))
+ break;
+
target = g_ptr_array_index (lookup->targets, j);
subdir = ide_makecache_target_get_subdir (target);
@@ -975,6 +978,9 @@ ide_makecache_get_file_flags_worker (GTask *task,
IDE_EXIT;
}
+ if (g_cancellable_is_cancelled (cancellable) && g_task_get_return_on_cancel (task))
+ IDE_EXIT;
+
g_task_return_new_error (task,
G_IO_ERROR,
G_IO_ERROR_FAILED,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]