mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Store: Use SharedSync for state
This commit is contained in:
parent
ce663d75e3
commit
ea46264bd3
2 changed files with 2 additions and 2 deletions
|
@ -920,7 +920,7 @@ StorePathSet Store::exportReferences(const StorePathSet & storePaths, const Stor
|
||||||
const Store::Stats & Store::getStats()
|
const Store::Stats & Store::getStats()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
auto state_(state.lock());
|
auto state_(state.read());
|
||||||
stats.pathInfoCacheSize = state_->pathInfoCache.size();
|
stats.pathInfoCacheSize = state_->pathInfoCache.size();
|
||||||
}
|
}
|
||||||
return stats;
|
return stats;
|
||||||
|
|
|
@ -201,7 +201,7 @@ protected:
|
||||||
LRUCache<std::string, PathInfoCacheValue> pathInfoCache;
|
LRUCache<std::string, PathInfoCacheValue> pathInfoCache;
|
||||||
};
|
};
|
||||||
|
|
||||||
Sync<State> state;
|
SharedSync<State> state;
|
||||||
|
|
||||||
std::shared_ptr<NarInfoDiskCache> diskCache;
|
std::shared_ptr<NarInfoDiskCache> diskCache;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue