cp_pooled_thread_client_interface acts as the link to the cp_pooled_thread_scheduler for clients that require a variable number of threads. More...
#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_scheduler * | owner |
| 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 | |
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
1.7.1