From 7bf1aff44a302ac66526ee27e3f70b28375ac68d Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 20 Jul 2024 21:05:19 +0200 Subject: [PATCH] libstore: remove an always-defaulted argument Change-Id: I3c7f17d5492a16bb54480fa1aa384b96fba72d61 --- src/libstore/build/worker.cc | 17 +++++++---------- src/libstore/build/worker.hh | 7 ++----- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index 873993e0d..402cdc5b4 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -205,7 +205,7 @@ void Worker::childStarted(GoalPtr goal, const std::set & fds, } -void Worker::childTerminated(Goal * goal, bool wakeSleepers) +void Worker::childTerminated(Goal * goal) { auto i = std::find_if(children.begin(), children.end(), [&](const Child & child) { return child.goal2 == goal; }); @@ -228,16 +228,13 @@ void Worker::childTerminated(Goal * goal, bool wakeSleepers) children.erase(i); - if (wakeSleepers) { - - /* Wake up goals waiting for a build slot. */ - for (auto & j : wantingToBuild) { - GoalPtr goal = j.lock(); - if (goal) wakeUp(goal); - } - - wantingToBuild.clear(); + /* Wake up goals waiting for a build slot. */ + for (auto & j : wantingToBuild) { + GoalPtr goal = j.lock(); + if (goal) wakeUp(goal); } + + wantingToBuild.clear(); } diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh index fbb5ad6ec..bbebeeb9c 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/build/worker.hh @@ -223,12 +223,9 @@ public: bool inBuildSlot, bool respectTimeouts); /** - * Unregisters a running child process. `wakeSleepers` should be - * false if there is no sense in waking up goals that are sleeping - * because they can't run yet (e.g., there is no free build slot, - * or the hook would still say `postpone`). + * Unregisters a running child process. */ - void childTerminated(Goal * goal, bool wakeSleepers = true); + void childTerminated(Goal * goal); /** * Put `goal` to sleep until a build slot becomes available (which