Functions
Valvula Thread Pool: Pool of threads which runns user defined async notifications.

Functions

void valvula_thread_pool_add (ValvulaCtx *ctx, int threads)
 Allows to increase the thread pool running on the provided context with the provided amount of threads. More...
 
void valvula_thread_pool_event_stats (ValvulaCtx *ctx, int *events_installed)
 Allows to get various stats from events installed. More...
 
int valvula_thread_pool_get_num (void)
 Returns how many threads have the given ValvulaThreadPool. More...
 
int valvula_thread_pool_get_running_threads (ValvulaCtx *ctx)
 Returns the running threads the given pool have. More...
 
void valvula_thread_pool_init (ValvulaCtx *ctx, int max_threads)
 Init the Valvula Thread Pool subsystem. More...
 
int valvula_thread_pool_new_event (ValvulaCtx *ctx, long microseconds, ValvulaThreadAsyncEvent event_handler, axlPointer user_data, axlPointer user_data2)
 Allows to install a new async event represented by the event handler provided. More...
 
void valvula_thread_pool_new_task (ValvulaCtx *ctx, ValvulaThreadFunc func, axlPointer data)
 Queue a new task inside the ValvulaThreadPool. More...
 
void valvula_thread_pool_remove (ValvulaCtx *ctx, int threads)
 Allows to decrease the thread pool running on the provided context with the provided amount of threads. More...
 
axl_bool valvula_thread_pool_remove_event (ValvulaCtx *ctx, int event_id)
 Allows to remove an event installed by valvula_thread_pool_new_event. More...
 
void valvula_thread_pool_set_cleanup_func (ValvulaCtx *ctx, ValvulaThreadCleanup func)
 Allows to configure a cleanup function that is called just after a thread from the thread pool is finished. More...
 
void valvula_thread_pool_set_exclusive_pool (ValvulaCtx *ctx, axl_bool value)
 Allows to configure current configuration for threads inside the thread pool created. More...
 
void valvula_thread_pool_set_num (int number)
 Allows to configure the number of threads inside the Valvula Thread Pool module. More...
 
void valvula_thread_pool_setup (ValvulaCtx *ctx, int thread_max_limit, int thread_add_step, int thread_add_period, axl_bool auto_remove)
 Allows to configure thread pool with several parameters to react to working peaks on thread in pool. More...
 
void valvula_thread_pool_stats (ValvulaCtx *ctx, int *running_threads, int *waiting_threads, int *pending_tasks)
 Allows to get current stats of the valvula thread pool. More...
 

Detailed Description