NOISSUE fix latent bugs in RWStorage
This commit is contained in:
parent
3406335cd8
commit
4530d9064b
@ -42,7 +42,7 @@ public:
|
||||
}
|
||||
void setStale(K key)
|
||||
{
|
||||
QReadLocker l(&lock);
|
||||
QWriteLocker l(&lock);
|
||||
if(cache.contains(key))
|
||||
{
|
||||
stale_entries.insert(key);
|
||||
@ -52,9 +52,10 @@ public:
|
||||
{
|
||||
QWriteLocker l(&lock);
|
||||
cache.clear();
|
||||
stale_entries.clear();
|
||||
}
|
||||
private:
|
||||
QReadWriteLock lock;
|
||||
QMap<K, V> cache;
|
||||
QSet<K> stale_entries;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user