mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Merge pull request #11196 from NixOS/rename-lock-read
Rename SyncBase::read() -> readLock()
This commit is contained in:
commit
3c0963487e
3 changed files with 3 additions and 3 deletions
|
@ -920,7 +920,7 @@ StorePathSet Store::exportReferences(const StorePathSet & storePaths, const Stor
|
|||
const Store::Stats & Store::getStats()
|
||||
{
|
||||
{
|
||||
auto state_(state.read());
|
||||
auto state_(state.readLock());
|
||||
stats.pathInfoCacheSize = state_->pathInfoCache.size();
|
||||
}
|
||||
return stats;
|
||||
|
|
|
@ -97,7 +97,7 @@ std::optional<struct stat> PosixSourceAccessor::cachedLstat(const CanonPath & pa
|
|||
Path absPath = makeAbsPath(path).string();
|
||||
|
||||
{
|
||||
auto cache(_cache.read());
|
||||
auto cache(_cache.readLock());
|
||||
auto i = cache->find(absPath);
|
||||
if (i != cache->end()) return i->second;
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
* Acquire read access to the inner value. When using
|
||||
* `std::shared_mutex`, this will use a shared lock.
|
||||
*/
|
||||
ReadLock read() const { return ReadLock(const_cast<SyncBase *>(this)); }
|
||||
ReadLock readLock() const { return ReadLock(const_cast<SyncBase *>(this)); }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
|
Loading…
Reference in a new issue