void myqtt_thread_pool_stats ( MyQttCtx ctx,
int *  running_threads,
int *  waiting_threads,
int *  pending_tasks 
)

Allows to get current stats of the myqtt thread pool.

The function returns the number of started threads (threads initialized at myqtt_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 msg notifications, connection close notifications and so on).

Parameters
ctxThe myqtt 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 myqtt_async_queue_items(), myqtt_async_queue_waiters(), myqtt_mutex_lock(), and myqtt_mutex_unlock().