Added: apr/site/trunk/docs/docs/apr/trunk/apr__thread__pool_8h.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__thread__pool_8h.html?rev=784636&view=auto ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__thread__pool_8h.html (added) +++ apr/site/trunk/docs/docs/apr/trunk/apr__thread__pool_8h.html Mon Jun 15 00:01:38 2009 @@ -0,0 +1,117 @@ + + +Apache Portable Runtime: apr_thread_pool.h File Reference + + + + + +
+

apr_thread_pool.h File Reference

APR Thread Pool Library. +More... +

+#include "apu.h"
+#include "apr_thread_proc.h"
+ +

+Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

+#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

Typedefs

typedef struct apr_thread_pool apr_thread_pool_t

Functions

 APU_DECLARE (apr_status_t) apr_thread_pool_create(apr_thread_pool_t **me
 APU_DECLARE (apr_size_t) apr_thread_pool_tasks_count(apr_thread_pool_t *me)
 apr_thread_pool_tasks_run_count (apr_thread_pool_t *me)
 apr_thread_pool_tasks_high_count (apr_thread_pool_t *me)
 apr_thread_pool_threads_high_count (apr_thread_pool_t *me)
 apr_thread_pool_threads_idle_timeout_count (apr_thread_pool_t *me)
 apr_thread_pool_idle_wait_set (apr_thread_pool_t *me, apr_interval_time_t timeout)
 apr_thread_pool_idle_wait_get (apr_thread_pool_t *me)

Variables

+apr_size_t init_threads
+apr_size_t apr_size_t max_threads
+apr_size_t apr_size_t apr_pool_tpool
+apr_thread_start_t func
+apr_thread_start_t void * param
+apr_thread_start_t void apr_byte_t priority
+apr_thread_start_t void
+apr_byte_t void * 
owner
+apr_thread_start_t void
+apr_interval_time_t 
time
+apr_size_t cnt
+apr_size_t val
+


Detailed Description

+APR Thread Pool Library. +

+

Remarks:
This library implements a thread pool using apr_thread_t. A thread pool is a set of threads that can be created in advance or on demand until a maximum number. When a task is scheduled, the thread pool will find an idle thread to handle the task. In case all existing threads are busy and the number of tasks in the queue is higher than the adjustable threshold, the pool will try to create a new thread to serve the task if the maximum number has not been reached. Otherwise, the task will be put into a queue based on priority, which can be valued from 0 to 255, with higher values being served first. If there are tasks with the same priority, the new task might be put at the top or at the bottom - it depends on which function is used to put the task.

+There may be the case where the thread pool can use up to the maximum number of threads at peak load, but having those threads idle afterwards. A maximum number of idle threads can be set so that the extra idling threads will be terminated to save system resources.

+
+
Generated on Mon Jun 15 09:45:28 2009 for Apache Portable Runtime by  + +doxygen 1.5.8
+ + Modified: apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html?rev=784636&r1=784635&r2=784636&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h-source.html Mon Jun 15 00:01:38 2009 @@ -1,16 +1,17 @@ Apache Portable Runtime: apr_thread_proc.h Source File - + - + -
Generated on Fri Feb 20 16:49:31 2009 for Apache Portable Runtime by  +
Generated on Mon Jun 15 09:45:28 2009 for Apache Portable Runtime by  -doxygen 1.5.7.1
+doxygen 1.5.8
Modified: apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h.html URL: http://svn.apache.org/viewvc/apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h.html?rev=784636&r1=784635&r2=784636&view=diff ============================================================================== --- apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h.html (original) +++ apr/site/trunk/docs/docs/apr/trunk/apr__thread__proc_8h.html Mon Jun 15 00:01:38 2009 @@ -1,16 +1,17 @@ Apache Portable Runtime: apr_thread_proc.h File Reference - + - +