Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apr_thread_pool.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed
4  * with this work for additional information regarding copyright
5  * ownership. The ASF licenses this file to you under the Apache
6  * License, Version 2.0 (the "License"); you may not use this file
7  * except in compliance with the License. You may obtain a copy of
8  * the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  * implied. See the License for the specific language governing
16  * permissions and limitations under the License.
17  */
18 
19 #ifndef APU_THREAD_POOL_H
20 #define APU_THREAD_POOL_H
21 
22 #include "apu.h"
23 #include "apr_thread_proc.h"
24 
45 #if APR_HAS_THREADS
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif /* __cplusplus */
50 
58 typedef struct apr_thread_pool apr_thread_pool_t;
59 
60 #define APR_THREAD_TASK_PRIORITY_LOWEST 0
61 #define APR_THREAD_TASK_PRIORITY_LOW 63
62 #define APR_THREAD_TASK_PRIORITY_NORMAL 127
63 #define APR_THREAD_TASK_PRIORITY_HIGH 191
64 #define APR_THREAD_TASK_PRIORITY_HIGHEST 255
65 
78  apr_size_t init_threads,
79  apr_size_t max_threads,
80  apr_pool_t *pool);
81 
87 
98  apr_thread_start_t func,
99  void *param,
100  apr_byte_t priority,
101  void *owner);
112  apr_thread_start_t func,
113  void *param,
114  apr_interval_time_t time,
115  void *owner);
116 
127  apr_thread_start_t func,
128  void *param,
129  apr_byte_t priority,
130  void *owner);
131 
142  void *owner);
143 
150 
157 
164 
171 
178 
187  apr_size_t cnt);
188 
196 
204 
212 
220 
227 
235  apr_size_t cnt);
236 
249  apr_interval_time_t timeout);
250 
259 
266 
274  apr_size_t val);
275 
282 
290  void **owner);
291 
294 #ifdef __cplusplus
295 }
296 #endif
297 
298 #endif /* APR_HAS_THREADS */
299 #endif /* !APR_THREAD_POOL_H */
apr_size_t apr_thread_pool_busy_count(apr_thread_pool_t *me)
size_t apr_size_t
Definition: apr.h:375
apr_size_t apr_thread_pool_threads_high_count(apr_thread_pool_t *me)
apr_size_t apr_thread_pool_idle_count(apr_thread_pool_t *me)
apr_size_t apr_thread_pool_idle_max_get(apr_thread_pool_t *me)
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:556
apr_size_t apr_thread_pool_thread_max_get(apr_thread_pool_t *me)
unsigned char apr_byte_t
Definition: apr.h:328
void *(APR_THREAD_FUNC * apr_thread_start_t)(apr_thread_t *, void *)
Definition: apr_thread_proc.h:208
apr_size_t apr_thread_pool_scheduled_tasks_count(apr_thread_pool_t *me)
apr_int64_t apr_interval_time_t
Definition: apr_time.h:55
apr_status_t apr_thread_pool_task_owner_get(apr_thread_t *thd, void **owner)
apr_size_t apr_thread_pool_tasks_run_count(apr_thread_pool_t *me)
apr_interval_time_t apr_thread_pool_idle_wait_get(apr_thread_pool_t *me)
Definition: apr_arch_threadproc.h:42
apr_size_t apr_thread_pool_tasks_count(apr_thread_pool_t *me)
apr_size_t apr_thread_pool_tasks_high_count(apr_thread_pool_t *me)
apr_size_t apr_thread_pool_thread_max_set(apr_thread_pool_t *me, apr_size_t cnt)
apr_size_t apr_thread_pool_threshold_set(apr_thread_pool_t *me, apr_size_t val)
APR Thread and Process Library.
apr_status_t apr_thread_pool_create(apr_thread_pool_t **me, apr_size_t init_threads, apr_size_t max_threads, apr_pool_t *pool)
struct apr_thread_pool apr_thread_pool_t
Definition: apr_thread_pool.h:58
#define APR_DECLARE(x)
Definition: macros.h:6
apr_status_t apr_thread_pool_tasks_cancel(apr_thread_pool_t *me, void *owner)
apr_status_t apr_thread_pool_destroy(apr_thread_pool_t *me)
apr_interval_time_t apr_thread_pool_idle_wait_set(apr_thread_pool_t *me, apr_interval_time_t timeout)
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
apr_size_t apr_thread_pool_threshold_get(apr_thread_pool_t *me)
int apr_status_t
Definition: apr_errno.h:44
apr_size_t apr_thread_pool_idle_max_set(apr_thread_pool_t *me, apr_size_t cnt)
apr_size_t apr_thread_pool_threads_count(apr_thread_pool_t *me)
apr_size_t apr_thread_pool_threads_idle_timeout_count(apr_thread_pool_t *me)
apr_status_t apr_thread_pool_push(apr_thread_pool_t *me, apr_thread_start_t func, void *param, apr_byte_t priority, void *owner)
apr_status_t apr_thread_pool_top(apr_thread_pool_t *me, apr_thread_start_t func, void *param, apr_byte_t priority, void *owner)
apr_status_t apr_thread_pool_schedule(apr_thread_pool_t *me, apr_thread_start_t func, void *param, apr_interval_time_t time, void *owner)