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.

The function returns the number of started threads (threads initialized at valvula_init_ctx), waiting threads (threads that aren't processing any job) and pending tasks (the amount of pending tasks to be processed by the pool (this includes frame notifications, connection close notifications and so on).

ctxThe valvula context. If NULL is received, the function do not return any stat.
running_threadsThe number of threads currently running. Optional argument. -1 in case of NULL ctx.
waiting_threadsThe number of waiting threads. Optional argument. -1 in case of NULL ctx.
pending_tasksThe number of pending tasks found in the pool (jobs still not processed). Optional argument. -1 in case of NULL ctx.

References valvula_async_queue_items(), valvula_async_queue_waiters(), valvula_mutex_lock(), and valvula_mutex_unlock().