Commit 7ca24dcd authored by Christian Hergert's avatar Christian Hergert
Browse files

pipeline: simplify cancellation chaining

We don't need a local cancellable.
parent f9174f20
......@@ -2992,7 +2992,6 @@ ide_build_pipeline_rebuild_async (IdeBuildPipeline *self,
gpointer user_data)
{
g_autoptr(GTask) task = NULL;
g_autoptr(GCancellable) local_cancellable = NULL;
TaskData *td;
IDE_ENTRY;
......@@ -3001,15 +3000,12 @@ ide_build_pipeline_rebuild_async (IdeBuildPipeline *self,
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
g_return_if_fail ((phase & ~IDE_BUILD_PHASE_MASK) == 0);
if (cancellable == NULL)
cancellable = local_cancellable = g_cancellable_new ();
cancellable = dzl_cancellable_chain (cancellable, self->cancellable);
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_priority (task, G_PRIORITY_LOW);
g_task_set_source_tag (task, ide_build_pipeline_rebuild_async);
dzl_cancellable_chain (cancellable, self->cancellable);
td = task_data_new (task, TASK_REBUILD);
td->phase = phase;
g_task_set_task_data (task, td, task_data_free);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment