C Collections

cthreadpool · Section 3

cthrpool_future_cancelled

cthrpool_future_cancelled - check whether a future was cancelled

C Collections (libccollections, -lccollections)

#include <ccollections/cthreadpool.h>
 
bool cthrpool_future_cancelled(cthrpool_future *f);

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.

f   Future handle (NULL returns false)

true if the future was cancelled, false otherwise.

cthrpool_future_get(3), cthrpool_future_done(3), cthrpool_shutdown_immediate(3)