diff options
author | eldritch horrors <pennae@lix.systems> | 2024-08-11 01:37:40 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-08-18 09:10:05 +0000 |
commit | 38f550708dd01515f7aaf66b0cc548fcd701e1c0 (patch) | |
tree | 67150416d442821b921d705aa5401a87c1d8f3bb /src/libstore/build/substitution-goal.hh | |
parent | 176e1058f11d4b957a82bd6cc184e73b1ce5688f (diff) |
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
Diffstat (limited to 'src/libstore/build/substitution-goal.hh')
-rw-r--r-- | src/libstore/build/substitution-goal.hh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstore/build/substitution-goal.hh b/src/libstore/build/substitution-goal.hh index 0260888ff..e546fc06f 100644 --- a/src/libstore/build/substitution-goal.hh +++ b/src/libstore/build/substitution-goal.hh @@ -66,7 +66,7 @@ struct PathSubstitutionGoal : public Goal std::unique_ptr<MaintainCount<uint64_t>> maintainExpectedSubstitutions, maintainRunningSubstitutions, maintainExpectedNar, maintainExpectedDownload; - typedef WorkResult (PathSubstitutionGoal::*GoalState)(); + typedef WorkResult (PathSubstitutionGoal::*GoalState)(bool inBuildSlot); GoalState state; /** @@ -94,16 +94,16 @@ public: return "a$" + std::string(storePath.name()) + "$" + worker.store.printStorePath(storePath); } - WorkResult work() override; + WorkResult work(bool inBuildSlot) override; /** * The states. */ - WorkResult init(); - WorkResult tryNext(); - WorkResult referencesValid(); - WorkResult tryToRun(); - WorkResult finished(); + WorkResult init(bool inBuildSlot); + WorkResult tryNext(bool inBuildSlot); + WorkResult referencesValid(bool inBuildSlot); + WorkResult tryToRun(bool inBuildSlot); + WorkResult finished(bool inBuildSlot); /** * Callback used by the worker to write to the log. |