diff options
Diffstat (limited to 'src/libstore/build/goal.hh')
-rw-r--r-- | src/libstore/build/goal.hh | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/libstore/build/goal.hh b/src/libstore/build/goal.hh index dd29b9fc4..5d7bb72b8 100644 --- a/src/libstore/build/goal.hh +++ b/src/libstore/build/goal.hh @@ -106,12 +106,28 @@ struct Goal : public std::enable_shared_from_this<Goal> public: struct [[nodiscard]] StillAlive {}; + struct [[nodiscard]] WaitForSlot {}; + struct [[nodiscard]] WaitForAWhile {}; + struct [[nodiscard]] ContinueImmediately {}; + struct [[nodiscard]] WaitForGoals { + Goals goals; + }; struct [[nodiscard]] Finished { ExitCode result; std::unique_ptr<Error> ex; + bool permanentFailure = false; + bool timedOut = false; + bool hashMismatch = false; + bool checkMismatch = false; }; - struct [[nodiscard]] WorkResult : std::variant<StillAlive, Finished> + struct [[nodiscard]] WorkResult : std::variant< + StillAlive, + WaitForSlot, + WaitForAWhile, + ContinueImmediately, + WaitForGoals, + Finished> { WorkResult() = delete; using variant::variant; @@ -133,8 +149,6 @@ public: virtual WorkResult work() = 0; - void addWaitee(GoalPtr waitee); - virtual void waiteeDone(GoalPtr waitee) { } virtual WorkResult handleChildOutput(int fd, std::string_view data) |