From 38f550708dd01515f7aaf66b0cc548fcd701e1c0 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sun, 11 Aug 2024 01:37:40 +0200 Subject: libstore: add explicit in-build-slot-ness to goals we don't need to expose information about how busy a Worker is if the worker can instead tell its work items whether they are in a slot. in the future we might use this to not start items waiting for a slot if no slots are currently available, but that requires more preparation. Change-Id: Ibe01ac536da7e6d6f80520164117c43e772f9bd9 --- src/libstore/build/drv-output-substitution-goal.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/libstore/build/drv-output-substitution-goal.hh') diff --git a/src/libstore/build/drv-output-substitution-goal.hh b/src/libstore/build/drv-output-substitution-goal.hh index a28347f15..a660a4f3e 100644 --- a/src/libstore/build/drv-output-substitution-goal.hh +++ b/src/libstore/build/drv-output-substitution-goal.hh @@ -58,20 +58,20 @@ class DrvOutputSubstitutionGoal : public Goal { public: DrvOutputSubstitutionGoal(const DrvOutput& id, Worker & worker, RepairFlag repair = NoRepair, std::optional ca = std::nullopt); - typedef WorkResult (DrvOutputSubstitutionGoal::*GoalState)(); + typedef WorkResult (DrvOutputSubstitutionGoal::*GoalState)(bool inBuildSlot); GoalState state; - WorkResult init(); - WorkResult tryNext(); - WorkResult realisationFetched(); - WorkResult outPathValid(); + WorkResult init(bool inBuildSlot); + WorkResult tryNext(bool inBuildSlot); + WorkResult realisationFetched(bool inBuildSlot); + WorkResult outPathValid(bool inBuildSlot); WorkResult finished(); Finished timedOut(Error && ex) override { abort(); }; std::string key() override; - WorkResult work() override; + WorkResult work(bool inBuildSlot) override; JobCategory jobCategory() const override { return JobCategory::Substitution; -- cgit v1.2.3