AWS IoT Device SDK C: Task Pool
Task pool library
Return to main page ↑
IotTaskPool_TryCancel

This function tries to cancel a job that was previously scheduled with IotTaskPool_Schedule.

A job can be canceled only if it is not yet executing, i.e. if its status is IOT_TASKPOOL_STATUS_READY or IOT_TASKPOOL_STATUS_SCHEDULED. Calling IotTaskPool_TryCancel on a job whose status is IOT_TASKPOOL_STATUS_COMPLETED, or IOT_TASKPOOL_STATUS_CANCELED will yield a IOT_TASKPOOL_CANCEL_FAILED return result.

Parameters
[in]taskPoolA handle to the task pool that must have been previously initialized with a call to IotTaskPool_Create.
[in]jobThe job to cancel.
[out]pStatusThe status of the job at the time of cancellation.
Returns
One of the following:
Warning
The taskPool used in this function should be the same used to create the job pointed to by job, or the results will be undefined.