_cp_pooled_thread_client_interface Struct Reference
[Cp_thread]

#include <thread.h>


Data Fields

int max
 thread count upper limit
int min
 thread count bottom limit
int count
 actual number of threads serving this client
void * client
 pointer to client
cp_pooled_thread_schedulerowner
 pointer to thread_pool_scheduler
cp_pooled_thread_report_load report_load
 client function to report load
cp_pooled_thread_shrink shrink
 client function to stop 1 thread
cp_thread_action action
 client thread function
void * action_prm
 parameter to client thread function (usually == client)
cp_thread_stop_fn stop_fn
 stop callback
void * stop_prm
 parameter to stop callback - if NULL action_prm will be used


Detailed Description

cp_pooled_thread_client_interface acts as the link to the cp_pooled_thread_scheduler for clients that require a variable number of threads. This interface holds 3 functions pointers that must be supplied by a client:
report_load - should return the number of open requests the client has to handle shrink - will be called by the framework to stop one client thread action - the thread function for this client

Definition at line 263 of file thread.h.


The documentation for this struct was generated from the following file:
Generated on Mon Dec 5 23:00:23 2011 for cprops by  doxygen 1.4.7