From a9f2aab22612bea940aa79cfb2eb15cc650ff869 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 5 Oct 2024 00:38:35 +0200 Subject: libstore: extract Worker::goalFinished specifics there's no reason to have the worker set information on goals that the goals themselves return from their entry point. doing this in the goal `work()` function is much cleaner, and a prerequisite to removing more implicit strong shared references to goals that are currently running. Change-Id: Ibb3e953ab8482a6a21ce2ed659d5023a991e7923 --- src/libstore/build/worker.cc | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/libstore/build/worker.cc') diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 0e8694a6d..e90f17678 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -195,19 +195,12 @@ static void removeGoal(std::shared_ptr goal, auto & goalMap) void Worker::goalFinished(GoalPtr goal, Goal::WorkResult & f) { - goal->trace("done"); - assert(!goal->exitCode.has_value()); - goal->exitCode = f.exitCode; - goal->ex = f.ex; - permanentFailure |= f.permanentFailure; timedOut |= f.timedOut; hashMismatch |= f.hashMismatch; checkMismatch |= f.checkMismatch; removeGoal(goal); - goal->notify->fulfill(); - goal->cleanup(); } void Worker::removeGoal(GoalPtr goal) -- cgit v1.2.3