refactor
This commit is contained in:
parent
7360b72c7b
commit
37854b693b
@ -107,7 +107,7 @@ void file_manager::close(std::uint64_t handle) {
|
||||
}
|
||||
|
||||
void file_manager::close_all(const std::string &api_path) {
|
||||
recur_mutex_lock file_lock(open_file_mtx_);
|
||||
unique_recur_mutex_lock file_lock(open_file_mtx_);
|
||||
std::vector<std::uint64_t> handles;
|
||||
auto iter = open_file_lookup_.find(api_path);
|
||||
if (iter != open_file_lookup_.end()) {
|
||||
@ -119,7 +119,9 @@ void file_manager::close_all(const std::string &api_path) {
|
||||
open_handle_lookup_.erase(handle);
|
||||
}
|
||||
|
||||
auto closeable_file = open_file_lookup_.at(api_path);
|
||||
open_file_lookup_.erase(api_path);
|
||||
file_lock.unlock();
|
||||
}
|
||||
|
||||
void file_manager::close_timed_out_files() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user