Add thread-local caches for file locks and handles in fd_pool

This commit is contained in:
ImBenji
2025-12-04 20:33:06 +00:00
parent 6e81375d7f
commit 4bace6f681
4 changed files with 74 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
#include "sweepstore/utils/file_lock.h"
#ifdef _WIN32
thread_local std::unordered_map<std::string, HANDLE> SweepstoreFileLock::handleCache;
#else
thread_local std::unordered_map<std::string, int> SweepstoreFileLock::fdCache;
#endif