diff options
author | eldritch horrors <pennae@lix.systems> | 2024-09-30 01:31:30 +0200 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-10-01 11:36:45 +0000 |
commit | d5db0b1abc1809ad97fa28b82056b19c4a45710a (patch) | |
tree | 4cad72d306db586912b40726414916b730e04826 /src/libstore/build/worker.hh | |
parent | b0c7c1ec664415d451dcd56d2982b369c0c33892 (diff) |
libstore: turn periodic gc attempt into a promise
notably we will check whether we want to do GC at all only once during
startup, and we'll only attempt GC every ten seconds rather than every
time a goal has finished a partial work call. this shouldn't cause any
problems in practice since relying on auto-gc is not deterministic and
stores in which builds can fill all remaining free space in merely ten
seconds are severely troubled even when gargage collection runs a lot.
Change-Id: I1175a56bf7f4e531f8be90157ad88750ff2ddec4
Diffstat (limited to 'src/libstore/build/worker.hh')
-rw-r--r-- | src/libstore/build/worker.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/build/worker.hh b/src/libstore/build/worker.hh index 6da76fe34..dc85c43e3 100644 --- a/src/libstore/build/worker.hh +++ b/src/libstore/build/worker.hh @@ -20,6 +20,7 @@ namespace nix { struct DerivationGoal; struct PathSubstitutionGoal; class DrvOutputSubstitutionGoal; +class LocalStore; typedef std::chrono::time_point<std::chrono::steady_clock> steady_time_point; @@ -189,6 +190,7 @@ private: } kj::Promise<Result<void>> runImpl(); + kj::Promise<Result<void>> boopGC(LocalStore & localStore); public: |