Merge pull request #11192 from DeterminateSystems/store-sharedsync

Store: Use SharedSync
This commit is contained in:
Robert Hensing 2024-07-27 01:32:13 +02:00 committed by GitHub
commit 95845d92f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -920,7 +920,7 @@ StorePathSet Store::exportReferences(const StorePathSet & storePaths, const Stor
const Store::Stats & Store::getStats()
{
{
auto state_(state.lock());
auto state_(state.read());
stats.pathInfoCacheSize = state_->pathInfoCache.size();
}
return stats;

View file

@ -201,7 +201,7 @@ protected:
LRUCache<std::string, PathInfoCacheValue> pathInfoCache;
};
Sync<State> state;
SharedSync<State> state;
std::shared_ptr<NarInfoDiskCache> diskCache;

View file

@ -89,7 +89,7 @@ public:
return i->second.second;
}
size_t size()
size_t size() const
{
return data.size();
}