[gnome-builder] pipeline: chain cancellable without creating secondary
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] pipeline: chain cancellable without creating secondary
- Date: Thu, 11 Jan 2018 06:05:18 +0000 (UTC)
commit aecd61e94b022de39305d831b8b3c6e0db6fa1d7
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 10 22:05:04 2018 -0800
pipeline: chain cancellable without creating secondary
src/libide/buildsystem/ide-build-pipeline.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index 9fb4c84..6e7e6d6 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -1540,13 +1540,14 @@ ide_build_pipeline_build_async (IdeBuildPipeline *self,
gpointer user_data)
{
g_autoptr(GTask) task = NULL;
- g_autoptr(GCancellable) local_cancellable = NULL;
TaskData *task_data;
IDE_ENTRY;
- if (cancellable == NULL)
- cancellable = local_cancellable = g_cancellable_new ();
+ g_return_if_fail (IDE_IS_BUILD_PIPELINE (self));
+ g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+ cancellable = dzl_cancellable_chain (cancellable, self->cancellable);
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, ide_build_pipeline_build_async);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]