1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Ratelimit MeshUpdateQueue::cleanupCache() runs

This commit is contained in:
sfan5 2022-07-31 23:10:18 +02:00
parent 6ec6acc539
commit 4c1ef1b72b
2 changed files with 12 additions and 1 deletions

View file

@ -83,6 +83,7 @@ private:
std::vector<QueuedMeshUpdate *> m_queue;
std::set<v3s16> m_urgents;
std::map<v3s16, CachedMapBlockData *> m_cache;
u64 m_next_cache_cleanup; // milliseconds
std::mutex m_mutex;
// TODO: Add callback to update these when g_settings changes