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

Function h2_workers_shutdown

modules/http2/h2_workers.c:548–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548void h2_workers_shutdown(h2_workers *workers, int graceful)
549{
550 ap_conn_producer_t *prod;
551
552 apr_thread_mutex_lock(workers->lock);
553 ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, workers->s,
554 "h2_workers: shutdown graceful=%d", graceful);
555 workers->shutdown = 1;
556 workers->idle_limit = apr_time_from_sec(1);
557 wake_all_idles(workers);
558 for (prod = APR_RING_FIRST(&workers->prod_idle);
559 prod != APR_RING_SENTINEL(&workers->prod_idle, ap_conn_producer_t, link);
560 prod = APR_RING_NEXT(prod, link)) {
561 if (prod->fn_shutdown) {
562 prod->fn_shutdown(prod->baton, graceful);
563 }
564 }
565 apr_thread_mutex_unlock(workers->lock);
566}
567
568ap_conn_producer_t *h2_workers_register(h2_workers *workers,
569 apr_pool_t *producer_pool,

Callers 1

h2_c1_child_stoppingFunction · 0.85

Calls 2

wake_all_idlesFunction · 0.85
ap_log_errorFunction · 0.50

Tested by

no test coverage detected