| 246 | } |
| 247 | |
| 248 | CachePin CacheShard::initEntry( |
| 249 | RawFileCacheKey key, |
| 250 | AsyncDataCacheEntry* entry, |
| 251 | bool cacheable) { |
| 252 | // The new entry is in the map and is in exclusive mode and is otherwise |
| 253 | // uninitialized. Other threads may find it and may add a promise or wait for |
| 254 | // a promise that another one has added. The new entry is otherwise volatile |
| 255 | // and uninterpretable except for this thread. Non access serializing members |
| 256 | // can be set outside of 'mutex_'. |
| 257 | entry->initialize( |
| 258 | FileCacheKey{StringIdLease(fileIds(), key.fileNum), key.offset}); |
| 259 | entry->setCacheable(cacheable); |
| 260 | cache_->incrementNew(entry->size()); |
| 261 | CachePin pin; |
| 262 | pin.setEntry(entry); |
| 263 | return pin; |
| 264 | } |
| 265 | |
| 266 | CoalescedLoad::~CoalescedLoad() { |
| 267 | // Continue possibly waiting threads. |
nothing calls this directly
no test coverage detected