Add thread-local caches for file locks and handles in fd_pool
This commit is contained in:
7
cpp/src/Private/sweepstore/utils/file_lock.cpp
Normal file
7
cpp/src/Private/sweepstore/utils/file_lock.cpp
Normal 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
|
||||
Reference in New Issue
Block a user