Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
thread-pool.hh File Reference
#include "error.hh"
#include "sync.hh"
#include <queue>
#include <functional>
#include <thread>
#include <map>
#include <atomic>

Go to the source code of this file.

Classes

class  nix::ThreadPool
 

Functions

 nix::MakeError (ThreadPoolShutDown, Error)
 
template<typename T>
void nix::processGraph (const std::set< T > &nodes, std::function< std::set< T >(const T &)> getEdges, std::function< void(const T &)> processNode)
 

Function Documentation

◆ processGraph()

template<typename T>
void nix::processGraph ( const std::set< T > & nodes,
std::function< std::set< T >(const T &)> getEdges,
std::function< void(const T &)> processNode )

Process in parallel a set of items of type T that have a partial ordering between them. Thus, any item is only processed after all its dependencies have been processed.