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

Method process_event

src/iocore/eventsystem/UnixEThread.cc:147–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void
148EThread::process_event(Event *e, int calling_code)
149{
150 ink_assert((!e->in_the_prot_queue && !e->in_the_priority_queue));
151 WEAK_MUTEX_TRY_LOCK(lock, e->mutex, this);
152 if (!lock.is_locked()) {
153 e->timeout_at = ink_get_hrtime() + DELAY_FOR_RETRY;
154 EventQueueExternal.enqueue_local(e);
155 } else {
156 if (e->cancelled) {
157 MUTEX_RELEASE(lock);
158 free_event(e);
159 return;
160 }
161 Continuation *c_temp = e->continuation;
162
163 // Restore the client IP debugging flags
164 set_cont_flags(e->continuation->control_flags);
165
166 e->continuation->handleEvent(calling_code, e);
167 ink_assert(!e->in_the_priority_queue);
168 ink_assert(c_temp == e->continuation);
169 MUTEX_RELEASE(lock);
170 if (e->period) {
171 if (!e->in_the_prot_queue && !e->in_the_priority_queue) {
172 if (e->period < 0) {
173 e->timeout_at = e->period;
174 } else {
175 e->timeout_at = ink_get_hrtime() + e->period;
176 }
177 EventQueueExternal.enqueue_local(e);
178 }
179 } else if (!e->in_the_prot_queue && !e->in_the_priority_queue) {
180 free_event(e);
181 }
182 }
183}
184
185void
186EThread::process_queue(Que(Event, link) * NegativeQueue, int *ev_count, int *nq_count)

Callers

nothing calls this directly

Calls 4

ink_get_hrtimeFunction · 0.85
set_cont_flagsFunction · 0.85
enqueue_localMethod · 0.80
handleEventMethod · 0.45

Tested by

no test coverage detected