MCPcopy Create free account
hub / github.com/apache/trafficserver / uniqueRelease

Method uniqueRelease

plugins/prefetch/fetch.cc:324–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324bool
325BgFetchState::uniqueRelease(const String &url)
326{
327 bool permitted = true;
328 ssize_t cachedCounter = 0;
329
330 TSMutexLock(_lock);
331 cachedCounter = --_concurrentFetches;
332 permitted = _unique->release(url);
333 TSMutexUnlock(_lock);
334
335 PrefetchDebug("cachedCounter: %zd", cachedCounter);
336
337 /* Update the metrics, no need to lock? */
338 if (permitted) {
339 setMetric(FETCH_ACTIVE, cachedCounter);
340 }
341 return permitted;
342}
343
344void
345BgFetchState::incrementMetric(PrefetchMetric m)

Callers 2

contHandleFetchFunction · 0.80
~BgFetchMethod · 0.80

Calls 3

TSMutexLockFunction · 0.85
TSMutexUnlockFunction · 0.85
releaseMethod · 0.45

Tested by

no test coverage detected