aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/worker.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-07-20 21:05:19 +0200
committereldritch horrors <pennae@lix.systems>2024-07-22 19:01:40 +0000
commitad36fb43ada8b4b31a10f6a7e1bade9f00aaa661 (patch)
tree061e7b4764207d36e457529feb9071d09ba08b4c /src/libstore/build/worker.cc
parentd70e045f90e8b41b5b9f1fa0777d98eed64afb17 (diff)
libstore: remove addToWeakGoals
under owner_less it's equivalent to insert(), only sometimes a little bit faster because it does not construct a weak_ptr if the goal is in the set already. this small difference in performance does not matter here and c++23 will make insert transparent anyway, so we can drop it Change-Id: I7cbd7d6e0daa95d67145ec58183162f6c4743b15
Diffstat (limited to 'src/libstore/build/worker.cc')
-rw-r--r--src/libstore/build/worker.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc
index f1f024ff6..873993e0d 100644
--- a/src/libstore/build/worker.cc
+++ b/src/libstore/build/worker.cc
@@ -163,7 +163,7 @@ void Worker::removeGoal(GoalPtr goal)
void Worker::wakeUp(GoalPtr goal)
{
goal->trace("woken up");
- addToWeakGoals(awake, goal);
+ awake.insert(goal);
}
@@ -249,14 +249,14 @@ void Worker::waitForBuildSlot(GoalPtr goal)
(isSubstitutionGoal && getNrSubstitutions() < settings.maxSubstitutionJobs))
wakeUp(goal); /* we can do it right away */
else
- addToWeakGoals(wantingToBuild, goal);
+ wantingToBuild.insert(goal);
}
void Worker::waitForAWhile(GoalPtr goal)
{
debug("wait for a while");
- addToWeakGoals(waitingForAWhile, goal);
+ waitingForAWhile.insert(goal);
}