Add thread-local caches for file locks and handles in fd_pool
This commit is contained in:
parent
55c69aebc2
commit
6e81375d7f
1 changed files with 12 additions and 0 deletions
12
cpp/src/Private/sweepstore/utils/fd_pool.cpp
Normal file
12
cpp/src/Private/sweepstore/utils/fd_pool.cpp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include "sweepstore/utils/file_lock.h"
|
||||
#include "sweepstore/utils/file_handle.h"
|
||||
|
||||
// Thread-local FD cache definition for file locking
|
||||
#ifndef _WIN32
|
||||
thread_local std::unordered_map<std::string, int> SweepstoreFileLock::fdCache;
|
||||
#endif
|
||||
|
||||
// Thread-local stream cache definition for file handles
|
||||
#ifndef WITH_UNREAL
|
||||
thread_local std::unordered_map<std::string, std::unique_ptr<std::fstream>> SweepstoreFileHandle::streamCache;
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue