refactor
This commit is contained in:
parent
6b67cd676d
commit
73efae7c2f
@ -138,8 +138,7 @@ void file_manager::close(std::uint64_t handle) {
|
||||
void file_manager::close_all(const std::string &api_path) {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
recur_mutex_lock file_lock(open_file_mtx_);
|
||||
|
||||
unique_recur_mutex_lock file_lock(open_file_mtx_);
|
||||
auto file_iter = open_file_lookup_.find(api_path);
|
||||
if (file_iter == open_file_lookup_.end()) {
|
||||
return;
|
||||
@ -147,6 +146,7 @@ void file_manager::close_all(const std::string &api_path) {
|
||||
|
||||
auto closeable_file = file_iter->second;
|
||||
open_file_lookup_.erase(api_path);
|
||||
file_lock.unlock();
|
||||
|
||||
closeable_file->remove_all();
|
||||
closeable_file.reset();
|
||||
|
Loading…
x
Reference in New Issue
Block a user