NOISSUE fix latent bugs in RWStorage

This commit is contained in:
Petr Mrázek 2018-04-02 22:58:54 +02:00
parent 3406335cd8
commit 4530d9064b

View File

@ -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;
};
};