.TH "ns_thrpool_config" 3 "Wed Oct 5 2016" "Nunc Stans" \" -*- nroff -*- .ad l .nh .SH NAME ns_thrpool_config \- .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Data Fields" .in +1c .ti -1c .RI "PRInt32 \fBinitial_threads\fP" .br .ti -1c .RI "PRInt32 \fBmax_threads\fP" .br .ti -1c .RI "PRUint32 \fBstacksize\fP" .br .ti -1c .RI "PRUint32 \fBevent_queue_size\fP" .br .ti -1c .RI "PRUint32 \fBwork_queue_size\fP" .br .ti -1c .RI "void(* \fBlog_fct\fP )(int, const char *, va_list)" .br .ti -1c .RI "void(* \fBlog_start_fct\fP )(void)" .br .ti -1c .RI "void(* \fBlog_close_fct\fP )(void)" .br .ti -1c .RI "void *(* \fBmalloc_fct\fP )(size_t)" .br .ti -1c .RI "void *(* \fBcalloc_fct\fP )(size_t, size_t)" .br .ti -1c .RI "void *(* \fBrealloc_fct\fP )(void *, size_t)" .br .ti -1c .RI "void(* \fBfree_fct\fP )(void *)" .br .in -1c .SH "Detailed Description" .PP Used to configure the thread pool .PP This is the argument to \fBns_thrpool_new()\fP\&. This is used to set all of the configuration parameters for the thread pool\&. .PP This must be initialized using \fBns_thrpool_config_init()\fP\&. This will initialize the fields to their default values\&. Use like this: .PP .nf struct ns_thrpool_config nsconfig; ns_thrpool_config_init(&nsconfig); nsconfig\&.initial_threads = 16; nsconfig\&.malloc_fct = mymalloc; \&.\&.\&. rc = ns_thrpool_new(&nsconfig); .fi .PP .PP \fBSee also:\fP .RS 4 \fBns_thrpool_config_init\fP, \fBns_thrpool_new\fP .RE .PP .SH "Field Documentation" .PP .SS "void*(* ns_thrpool_config::calloc_fct) (size_t, size_t)" calloc() replacement .SS "PRUint32 ns_thrpool_config::event_queue_size" Size of the event queue .SS "void(* ns_thrpool_config::free_fct) (void *)" free() replacement .SS "PRInt32 ns_thrpool_config::initial_threads" Number of thread pool threads to start with .SS "void(* ns_thrpool_config::log_close_fct) (void)" Function to call to shutdown the logging system .SS "void(* ns_thrpool_config::log_fct) (int, const char *, va_list)" Provide a function that works like vsyslog .SS "void(* ns_thrpool_config::log_start_fct) (void)" Function to call to initialize the logging system .SS "void*(* ns_thrpool_config::malloc_fct) (size_t)" malloc() replacement .SS "PRInt32 ns_thrpool_config::max_threads" Do not grow the thread pool greater than this size .SS "void*(* ns_thrpool_config::realloc_fct) (void *, size_t)" realloc() replacement .SS "PRUint32 ns_thrpool_config::stacksize" Thread stack size .SS "PRUint32 ns_thrpool_config::work_queue_size" Size of the work queue .SH "Author" .PP Generated automatically by Doxygen for Nunc Stans from the source code\&.