![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <set>#include <future>#include "nix/util/fun.hh"#include "nix/util/sync.hh"#include "nix/util/async.hh"#include "nix/util/ref.hh"#include <boost/asio/io_context.hpp>#include <boost/asio/post.hpp>#include <boost/asio/strand.hpp>#include <boost/asio/detached.hpp>#include <boost/asio/awaitable.hpp>#include <boost/asio/co_spawn.hpp>#include <boost/asio/bind_executor.hpp>#include <boost/asio/executor_work_guard.hpp>#include <queue>Go to the source code of this file.
Typedefs | |
| template<typename T> | |
| using | nix::GetEdgesAsync = fun<asio::awaitable<std::set<T>>(const T & elt)> |
Functions | |
| template<typename T, typename CompletionToken> | |
| auto | nix::computeClosure (std::set< T > startElts, std::set< T > &res, GetEdgesAsync< T > getEdges, CompletionToken token) |
| template<typename T> | |
| void | nix::computeClosure (std::set< T > startElts, std::set< T > &res, GetEdgesAsync< T > getEdges) |
| auto nix::computeClosure | ( | std::set< T > | startElts, |
| std::set< T > & | res, | ||
| GetEdgesAsync< T > | getEdges, | ||
| CompletionToken | token ) |
Needed to keep the ctx.run() alive because actual work might be happening on another thread (like with FileTransfer case).
Amount of coroutines currently in flight.
Maximum number of concurrent coroutines. Implements primitive rate limiting.
Nodes to handle next.
First error encountered from getEdges. Gets rethrown on complete when all coroutines have drained. It's only when all the coroutines have finished that we can release our work guard.