| 179 | } |
| 180 | |
| 181 | void LibCache::DecrementUseCount(LibCacheEntry* entry) { |
| 182 | if (entry == nullptr) return; |
| 183 | bool can_delete = false; |
| 184 | { |
| 185 | unique_lock<mutex> lock(entry->lock); |
| 186 | --entry->use_count; |
| 187 | can_delete = (entry->use_count == 0 && entry->should_remove); |
| 188 | } |
| 189 | if (can_delete) delete entry; |
| 190 | } |
| 191 | |
| 192 | Status LibCache::GetLocalPath(const std::string& hdfs_lib_file, LibType type, |
| 193 | time_t exp_mtime, LibCacheEntryHandle* handle, string* path) { |
no outgoing calls
no test coverage detected