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

Method check_activity

include/iocore/net/NetTimeout.h:245–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244template <class T, class List>
245inline int
246ActivityCop<T, List>::check_activity(int /* event */, Event *e)
247{
248 ink_hrtime now = ink_get_hrtime();
249
250 // Traverse list & check inactivity or activity
251 T *t = _list->head;
252 while (t) {
253 T *next = _list->next(t);
254 if (t->mutex == nullptr) {
255 t = next;
256 continue;
257 }
258
259 MUTEX_TRY_LOCK(lock, t->mutex, this_ethread());
260 if (!lock.is_locked()) {
261 t = next;
262 continue;
263 }
264
265 if (t->is_inactive_timeout_expired(now)) {
266 t->handleEvent(VC_EVENT_INACTIVITY_TIMEOUT, e);
267 } else if (t->is_active_timeout_expired(now)) {
268 t->handleEvent(VC_EVENT_ACTIVE_TIMEOUT, e);
269 }
270
271 t = next;
272 }
273
274 return EVENT_DONE;
275}

Callers

nothing calls this directly

Calls 6

ink_get_hrtimeFunction · 0.85
this_ethreadFunction · 0.85
nextMethod · 0.45
handleEventMethod · 0.45

Tested by

no test coverage detected