| 244 | } |
| 245 | |
| 246 | void LibCache::SetNeedsRefresh(const string& hdfs_lib_file) { |
| 247 | unique_lock<mutex> lib_cache_lock(lock_); |
| 248 | LibMap::iterator it = lib_cache_.find(hdfs_lib_file); |
| 249 | if (it == lib_cache_.end()) return; |
| 250 | LibCacheEntry* entry = it->second; |
| 251 | |
| 252 | unique_lock<mutex> entry_lock(entry->lock); |
| 253 | // Need to hold lock_ before setting check_needs_refresh. |
| 254 | entry->check_needs_refresh = true; |
| 255 | } |
| 256 | |
| 257 | void LibCache::RemoveEntry(const string& hdfs_lib_file) { |
| 258 | unique_lock<mutex> lib_cache_lock(lock_); |
no test coverage detected