C Collections

cthreadpool · Section 3

cthrpool_pending_count

cthrpool_pending_count - number of tasks in the queue

C Collections (libccollections, -lccollections)

#include <ccollections/cthreadpool.h>
 
size_t cthrpool_pending_count(cthrpool pool);

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.

pool   Thread pool handle (CTHRPOOL_NULL or a stale/already-destroyed handle returns 0)

Number of queued tasks, or 0 if pool is CTHRPOOL_NULL or a stale/already-destroyed handle.

cthrpool_active_count(3)