Skip to content
Snippets Groups Projects
Commit 89cf988a authored by Ansariel's avatar Ansariel
Browse files

BUG-230673: Add warning that LLDiskCache::purge() is also called from outside the main thread

parent 0e253cb9
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,8 @@ LLDiskCache::LLDiskCache(const std::string cache_dir, ...@@ -51,6 +51,8 @@ LLDiskCache::LLDiskCache(const std::string cache_dir,
LLFile::mkdir(cache_dir); LLFile::mkdir(cache_dir);
} }
// WARNING: purge() is called by LLPurgeDiskCacheThread. As such it must
// NOT touch any LLDiskCache data without introducing and locking a mutex!
void LLDiskCache::purge() void LLDiskCache::purge()
{ {
if (mEnableCacheDebugInfo) if (mEnableCacheDebugInfo)
......
...@@ -118,6 +118,9 @@ class LLDiskCache : ...@@ -118,6 +118,9 @@ class LLDiskCache :
/** /**
* Purge the oldest items in the cache so that the combined size of all files * Purge the oldest items in the cache so that the combined size of all files
* is no bigger than mMaxSizeBytes. * is no bigger than mMaxSizeBytes.
*
* WARNING: purge() is called by LLPurgeDiskCacheThread. As such it must
* NOT touch any LLDiskCache data without introducing and locking a mutex!
*/ */
void purge(); void purge();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment