| 1045 | } |
| 1046 | |
| 1047 | void h2_get_workers_config(server_rec *s, int *pminw, int *pmaxw, |
| 1048 | apr_time_t *pidle_limit) |
| 1049 | { |
| 1050 | int threads_per_child = 0; |
| 1051 | |
| 1052 | *pminw = h2_config_sgeti(s, H2_CONF_MIN_WORKERS); |
| 1053 | *pmaxw = h2_config_sgeti(s, H2_CONF_MAX_WORKERS); |
| 1054 | |
| 1055 | ap_mpm_query(AP_MPMQ_MAX_THREADS, &threads_per_child); |
| 1056 | if (*pminw <= 0) { |
| 1057 | *pminw = threads_per_child; |
| 1058 | } |
| 1059 | if (*pmaxw <= 0) { |
| 1060 | *pmaxw = H2MAX(4, 3 * (*pminw) / 2); |
| 1061 | } |
| 1062 | *pidle_limit = h2_config_sgeti64(s, H2_CONF_MAX_WORKER_IDLE_LIMIT); |
| 1063 | } |
| 1064 | |
| 1065 | #define AP_END_CMD AP_INIT_TAKE1(NULL, NULL, NULL, RSRC_CONF, NULL) |
| 1066 |
no test coverage detected