cthreadpool · Section 3
cthrpool_pending_count
NAME
cthrpool_pending_count - number of tasks in the queue
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cthreadpool.h> size_t cthrpool_pending_count(cthrpool pool);
DESCRIPTION
Returns a snapshot of how many tasks sit in the task queue, which means submitted but not picked up by a worker thread yet. The value can change as soon as the call returns.
PARAMETERS
pool Thread pool handle (CTHRPOOL_NULL or a stale/already-destroyed handle returns 0)
RETURN VALUE
Number of queued tasks, or 0 if pool is CTHRPOOL_NULL or a stale/already-destroyed handle.