![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <counter.hh>
Public Types | |
| using | value_type = uint64_t |
Public Attributes | |
| std::atomic< value_type > | inner {0} |
Static Public Attributes | |
| static bool | enabled = getEnv("NIX_SHOW_STATS").value_or("0") != "0" |
An atomic counter aligned on a cache line to prevent false sharing. The counter is only enabled when the NIX_SHOW_STATS environment variable is set. This is to prevent contention on these counters when multi-threaded evaluation is enabled.