Loading...
Searching...
No Matches
apr_thread_pool.h
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#ifndef APU_THREAD_POOL_H
#define APU_THREAD_POOL_H
#include "apu.h"
#include "apr_thread_proc.h"
#if APR_HAS_THREADS
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct apr_thread_pool apr_thread_pool_t;
#define APR_THREAD_TASK_PRIORITY_LOWEST 0
#define APR_THREAD_TASK_PRIORITY_LOW 63
#define APR_THREAD_TASK_PRIORITY_NORMAL 127
#define APR_THREAD_TASK_PRIORITY_HIGH 191
#define APR_THREAD_TASK_PRIORITY_HIGHEST 255
APU_DECLARE(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);
APU_DECLARE(apr_status_t) apr_thread_pool_destroy(apr_thread_pool_t *me);
APU_DECLARE(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);
APU_DECLARE(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);
APU_DECLARE(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);
APU_DECLARE(apr_status_t) apr_thread_pool_tasks_cancel(apr_thread_pool_t *me,
void *owner);
APU_DECLARE(apr_size_t) apr_thread_pool_tasks_count(apr_thread_pool_t *me);
APU_DECLARE(apr_size_t) apr_thread_pool_scheduled_tasks_count(apr_thread_pool_t *me);
APU_DECLARE(apr_size_t) apr_thread_pool_threads_count(apr_thread_pool_t *me);
APU_DECLARE(apr_size_t) apr_thread_pool_busy_count(apr_thread_pool_t *me);
APU_DECLARE(apr_size_t) apr_thread_pool_idle_count(apr_thread_pool_t *me);
APU_DECLARE(apr_size_t) apr_thread_pool_idle_max_set(apr_thread_pool_t *me,
apr_size_t cnt);
APU_DECLARE(apr_size_t)
apr_thread_pool_tasks_run_count(apr_thread_pool_t * me);
APU_DECLARE(apr_size_t)
apr_thread_pool_tasks_high_count(apr_thread_pool_t * me);
APU_DECLARE(apr_size_t)
apr_thread_pool_threads_high_count(apr_thread_pool_t * me);
APU_DECLARE(apr_size_t)
apr_thread_pool_threads_idle_timeout_count(apr_thread_pool_t * me);
APU_DECLARE(apr_size_t) apr_thread_pool_idle_max_get(apr_thread_pool_t *me);
APU_DECLARE(apr_size_t) apr_thread_pool_thread_max_set(apr_thread_pool_t *me,
apr_size_t cnt);
APU_DECLARE(apr_interval_time_t)
apr_thread_pool_idle_wait_set(apr_thread_pool_t * me,
apr_interval_time_t timeout);
APU_DECLARE(apr_interval_time_t)
apr_thread_pool_idle_wait_get(apr_thread_pool_t * me);
APU_DECLARE(apr_size_t) apr_thread_pool_thread_max_get(apr_thread_pool_t *me);
APU_DECLARE(apr_size_t) apr_thread_pool_threshold_set(apr_thread_pool_t *me,
apr_size_t val);
APU_DECLARE(apr_size_t) apr_thread_pool_threshold_get(apr_thread_pool_t * me);
APU_DECLARE(apr_status_t) apr_thread_pool_task_owner_get(apr_thread_t *thd,
void **owner);
#ifdef __cplusplus
}
#endif
#endif /* APR_HAS_THREADS */
#endif /* !APR_THREAD_POOL_H */
apr_thread_pool_idle_max_set
apr_size_t apr_thread_pool_idle_max_set(apr_thread_pool_t *me, apr_size_t cnt)
apr_thread_pool_threshold_set
apr_size_t apr_thread_pool_threshold_set(apr_thread_pool_t *me, apr_size_t val)
apr_thread_pool_idle_wait_set
apr_interval_time_t apr_thread_pool_idle_wait_set(apr_thread_pool_t *me, apr_interval_time_t timeout)
apr_thread_pool_threshold_get
apr_size_t apr_thread_pool_threshold_get(apr_thread_pool_t *me)
apr_thread_pool_tasks_count
apr_size_t apr_thread_pool_tasks_count(apr_thread_pool_t *me)
apr_thread_pool_tasks_high_count
apr_size_t apr_thread_pool_tasks_high_count(apr_thread_pool_t *me)
apr_thread_pool_idle_max_get
apr_size_t apr_thread_pool_idle_max_get(apr_thread_pool_t *me)
apr_thread_pool_idle_wait_get
apr_interval_time_t apr_thread_pool_idle_wait_get(apr_thread_pool_t *me)
apr_thread_pool_threads_count
apr_size_t apr_thread_pool_threads_count(apr_thread_pool_t *me)
apr_thread_pool_top
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_thread_pool_create
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)
apr_thread_pool_thread_max_set
apr_size_t apr_thread_pool_thread_max_set(apr_thread_pool_t *me, apr_size_t cnt)
apr_thread_pool_schedule
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)
apr_thread_pool_tasks_run_count
apr_size_t apr_thread_pool_tasks_run_count(apr_thread_pool_t *me)
apr_thread_pool_destroy
apr_status_t apr_thread_pool_destroy(apr_thread_pool_t *me)
apr_thread_pool_t
struct apr_thread_pool apr_thread_pool_t
Definition apr_thread_pool.h:58
apr_thread_pool_threads_high_count
apr_size_t apr_thread_pool_threads_high_count(apr_thread_pool_t *me)
apr_thread_pool_scheduled_tasks_count
apr_size_t apr_thread_pool_scheduled_tasks_count(apr_thread_pool_t *me)
apr_thread_pool_thread_max_get
apr_size_t apr_thread_pool_thread_max_get(apr_thread_pool_t *me)
apr_thread_pool_push
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_thread_pool_idle_count
apr_size_t apr_thread_pool_idle_count(apr_thread_pool_t *me)
apr_thread_pool_tasks_cancel
apr_status_t apr_thread_pool_tasks_cancel(apr_thread_pool_t *me, void *owner)
apr_thread_pool_task_owner_get
apr_status_t apr_thread_pool_task_owner_get(apr_thread_t *thd, void **owner)
apr_thread_pool_busy_count
apr_size_t apr_thread_pool_busy_count(apr_thread_pool_t *me)
apr_thread_pool_threads_idle_timeout_count
apr_size_t apr_thread_pool_threads_idle_timeout_count(apr_thread_pool_t *me)