cthreadpool · Section 3
cthrpool_future_cancelled
NAME
cthrpool_future_cancelled - check whether a future was cancelled
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cthreadpool.h> bool cthrpool_future_cancelled(cthrpool_future *f);
DESCRIPTION
Returns true if cthrpool_shutdown_immediate discarded the task of this future before it could run. In that case cthrpool_future_get returns NULL and cthrpool_future_done returns true.
PARAMETERS
f Future handle (NULL returns false)
RETURN VALUE
true if the future was cancelled, false otherwise.
SEE ALSO
cthrpool_future_get(3), cthrpool_future_done(3), cthrpool_shutdown_immediate(3)