diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 15:48:14 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 15:48:14 +0000 |
commit | 8ba089597fa19bfd49ba5f22a5e821740ca4eb5d (patch) | |
tree | b4f2299b9c973ef7636f8ce1bab0299dee4cc389 /src/libstore/build/drv-output-substitution-goal.hh | |
parent | 13b6b645897fd2edaa0f09fa48d6fe8dd6287b55 (diff) | |
parent | 4d98143914120d0163f5c50f30ce8a5289433f8f (diff) |
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libstore/build/drv-output-substitution-goal.hh')
-rw-r--r-- | src/libstore/build/drv-output-substitution-goal.hh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/libstore/build/drv-output-substitution-goal.hh b/src/libstore/build/drv-output-substitution-goal.hh index 63ab53d89..948dbda8f 100644 --- a/src/libstore/build/drv-output-substitution-goal.hh +++ b/src/libstore/build/drv-output-substitution-goal.hh @@ -3,6 +3,8 @@ #include "store-api.hh" #include "goal.hh" #include "realisation.hh" +#include <thread> +#include <future> namespace nix { @@ -20,11 +22,18 @@ private: // The realisation corresponding to the given output id. // Will be filled once we can get it. - std::optional<Realisation> outputInfo; + std::shared_ptr<const Realisation> outputInfo; /* The remaining substituters. */ std::list<ref<Store>> subs; + /* The current substituter. */ + std::shared_ptr<Store> sub; + + Pipe outPipe; + std::thread thr; + std::promise<std::shared_ptr<const Realisation>> promise; + /* Whether a substituter failed. */ bool substituterFailed = false; @@ -36,15 +45,16 @@ public: void init(); void tryNext(); + void realisationFetched(); void outPathValid(); void finished(); void timedOut(Error && ex) override { abort(); }; - string key() override; + std::string key() override; void work() override; - + void handleEOF(int fd) override; }; } |