Apache2
h2_workers.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __mod_h2__h2_workers__
18 #define __mod_h2__h2_workers__
19 
20 /* Thread pool specific to executing secondary connections.
21  * Has a minimum and maximum number of workers it creates.
22  * Starts with minimum workers and adds some on load,
23  * reduces the number again when idle.
24  */
25 struct apr_thread_mutex_t;
26 struct apr_thread_cond_t;
27 struct h2_mplx;
28 struct h2_request;
29 struct h2_fifo;
30 
31 typedef struct h2_workers h2_workers;
32 
33 
46  int max_slots, int min_active, apr_time_t idle_limit);
47 
51 void h2_workers_shutdown(h2_workers *workers, int graceful);
52 
57 
71 
80 typedef conn_rec *ap_conn_producer_next(void *baton, int *pmore);
81 
87 typedef void ap_conn_producer_done(void *baton, conn_rec *conn);
88 
94 typedef void ap_conn_producer_shutdown(void *baton, int graceful);
95 
109  apr_pool_t *producer_pool,
110  const char *name,
111  ap_conn_producer_next *fn_next,
112  ap_conn_producer_done *fn_done,
113  ap_conn_producer_shutdown *fn_shutdown,
114  void *baton);
115 
121 
128 
129 #endif /* defined(__mod_h2__h2_workers__) */
const char * s
Definition: mod_dav.h:1327
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:557
const char * name
Definition: mod_dav.h:805
int apr_status_t
Definition: apr_errno.h:44
unsigned int apr_uint32_t
Definition: apr.h:348
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
apr_int64_t apr_time_t
Definition: apr_time.h:45
struct h2_fifo h2_fifo
Definition: h2_util.h:195
h2_workers * h2_workers_create(server_rec *s, apr_pool_t *pool, int max_slots, int min_active, apr_time_t idle_limit)
apr_uint32_t h2_workers_get_max_workers(h2_workers *workers)
void ap_conn_producer_done(void *baton, conn_rec *conn)
Definition: h2_workers.h:87
ap_conn_producer_t * h2_workers_register(h2_workers *workers, apr_pool_t *producer_pool, const char *name, ap_conn_producer_next *fn_next, ap_conn_producer_done *fn_done, ap_conn_producer_shutdown *fn_shutdown, void *baton)
struct ap_conn_producer_t ap_conn_producer_t
Definition: h2_workers.h:70
void h2_workers_shutdown(h2_workers *workers, int graceful)
struct h2_workers h2_workers
Definition: h2_workers.h:31
conn_rec * ap_conn_producer_next(void *baton, int *pmore)
Definition: h2_workers.h:80
apr_status_t h2_workers_activate(h2_workers *workers, ap_conn_producer_t *producer)
void ap_conn_producer_shutdown(void *baton, int graceful)
Definition: h2_workers.h:94
apr_status_t h2_workers_join(h2_workers *workers, ap_conn_producer_t *producer)
Definition: apr_arch_thread_cond.h:34
Definition: apr_arch_thread_mutex.h:28
Structure to store things which are per connection.
Definition: httpd.h:1193
Definition: h2_mplx.h:58
Definition: h2.h:169
A structure to store information for each virtual server.
Definition: httpd.h:1382