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();
}