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

Method acquire

plugins/background_fetch/background_fetch.cc:96–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 }
95
96 bool
97 acquire(const std::string &url)
98 {
99 bool ret;
100
101 TSMutexLock(_lock);
102 if (_urls.end() == _urls.find(url)) {
103 _urls[url] = true;
104 ret = true;
105 } else {
106 ret = false;
107 }
108 TSMutexUnlock(_lock);
109
110 Dbg(Bg_dbg_ctl, "BgFetchState.acquire(): ret = %d, url = %s", ret, url.c_str());
111
112 return ret;
113 }
114
115 bool
116 release(const std::string &url)

Callers 1

acquireUrlMethod · 0.45

Calls 5

TSMutexLockFunction · 0.85
TSMutexUnlockFunction · 0.85
endMethod · 0.45
findMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected