diff options
author | eldritch horrors <pennae@lix.systems> | 2024-09-01 01:37:10 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-09-27 16:39:33 +0200 |
commit | cd1ceffb0ee9544bf14453f94da6b6f0d52f10cd (patch) | |
tree | eb055f15f9bf62ebb9fbb373056bd48703769203 /src/libstore/build/goal.hh | |
parent | 0478949c72310b9749d5b959adad8bdf5c2c0841 (diff) |
libstore: make waiting for a while a promise
this simplifies waitForInput quite a lot, and at the same time makes
polling less thundering-herd-y. it even fixes early polling wakeups!
Change-Id: I6dfa62ce91729b8880342117d71af5ae33366414
Diffstat (limited to 'src/libstore/build/goal.hh')
-rw-r--r-- | src/libstore/build/goal.hh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/build/goal.hh b/src/libstore/build/goal.hh index 3f6e8396e..fbf767e8d 100644 --- a/src/libstore/build/goal.hh +++ b/src/libstore/build/goal.hh @@ -118,7 +118,6 @@ public: struct [[nodiscard]] StillAlive {}; struct [[nodiscard]] WaitForSlot {}; - struct [[nodiscard]] WaitForAWhile {}; struct [[nodiscard]] ContinueImmediately {}; struct [[nodiscard]] WaitForGoals { Goals goals; @@ -140,7 +139,6 @@ public: struct [[nodiscard]] WorkResult : std::variant< StillAlive, WaitForSlot, - WaitForAWhile, ContinueImmediately, WaitForGoals, WaitForWorld, @@ -150,6 +148,11 @@ public: using variant::variant; }; +protected: + kj::Promise<Result<WorkResult>> waitForAWhile(); + +public: + /** * Exception containing an error message, if any. */ |