cthreadpool · Section 3
cthrpool_active_count
NAME
cthrpool_active_count - number of tasks that run now
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cthreadpool.h> size_t cthrpool_active_count(cthrpool pool);
DESCRIPTION
Returns a snapshot of how many tasks the worker threads are running at the moment, that is, tasks that a worker has taken out of the queue and that have not finished yet. The value can change as soon as the call returns.
PARAMETERS
pool Thread pool handle. CTHRPOOL_NULL, or a stale or
already-destroyed handle, gives 0.
RETURN VALUE
The number of tasks running at the moment, or 0 if pool is CTHRPOOL_NULL or a stale or already-destroyed handle.