MCPcopy Create free account
hub / github.com/apache/httpd / wake_idle_worker

Function wake_idle_worker

modules/http2/h2_workers.c:181–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181static void wake_idle_worker(h2_workers *workers, ap_conn_producer_t *prod)
182{
183 if (!APR_RING_EMPTY(&workers->idle, h2_slot, link)) {
184 h2_slot *slot;
185 for (slot = APR_RING_FIRST(&workers->idle);
186 slot != APR_RING_SENTINEL(&workers->idle, h2_slot, link);
187 slot = APR_RING_NEXT(slot, link)) {
188 if (slot->is_idle && !slot->should_shutdown) {
189 apr_thread_cond_signal(slot->more_work);
190 slot->is_idle = 0;
191 return;
192 }
193 }
194 }
195 if (workers->dynamic && !workers->shutdown
196 && (workers->active_slots < workers->max_slots)) {
197 activate_slot(workers);
198 }
199}
200
201/**
202 * Get the next connection to work on.

Callers 2

get_nextFunction · 0.85
h2_workers_activateFunction · 0.85

Calls 1

activate_slotFunction · 0.85

Tested by

no test coverage detected