From 7ef44660181b5c9743475ea73bc2e87a5f1d318f Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 5 Oct 2024 00:38:35 +0200 Subject: libstore: have goals promise WorkResults, not void Change-Id: Idd218ec1572eda84dc47accc0dcd8a954d36f098 --- src/libstore/build/goal.hh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/libstore/build/goal.hh') diff --git a/src/libstore/build/goal.hh b/src/libstore/build/goal.hh index 10926fffc..fbcbbcffc 100644 --- a/src/libstore/build/goal.hh +++ b/src/libstore/build/goal.hh @@ -92,8 +92,10 @@ struct Goal */ BuildResult buildResult; + struct WorkResult; + // for use by Worker and Goal only. will go away once work() is a promise. - kj::Own> notify; + kj::Own>> notify; protected: AsyncSemaphore::Token slotToken; @@ -112,13 +114,15 @@ public: protected: kj::Promise waitForAWhile(); kj::Promise> - waitForGoals(kj::Array>> dependencies) noexcept; + waitForGoals(kj::Array>>> dependencies) noexcept; template... G> kj::Promise> - waitForGoals(std::pair, kj::Promise>... goals) noexcept + waitForGoals(std::pair, kj::Promise>>... goals) noexcept { - return waitForGoals(kj::arrOf>>(std::move(goals)...)); + return waitForGoals( + kj::arrOf>>>(std::move(goals)...) + ); } virtual kj::Promise> workImpl() noexcept = 0; -- cgit v1.2.3