diff options
-rw-r--r-- | api/logic/RWStorage.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/api/logic/RWStorage.h b/api/logic/RWStorage.h index b1598ca4..bbe8ac5a 100644 --- a/api/logic/RWStorage.h +++ b/api/logic/RWStorage.h @@ -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; -};
\ No newline at end of file +}; |