Task Pool API Reference
Task pool library
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.
IotTaskPool_TryCancel
IotTaskPoolError_t IotTaskPool_TryCancel(IotTaskPool_t taskPool, IotTaskPoolJob_t job, IotTaskPoolJobStatus_t *const pStatus)
This function tries to cancel a job that was previously scheduled with IotTaskPool_Schedule.
Definition: iot_taskpool.c:550
IotTaskPool_t
struct _taskPool * IotTaskPool_t
Opaque handle of a Task Pool instance.
Definition: iot_taskpool_types.h:213
IotTaskPoolJobStatus_t
IotTaskPoolJobStatus_t
Status codes of task pool Job.
Definition: iot_taskpool_types.h:156
IotTaskPoolError_t
IotTaskPoolError_t
Return codes of task pool functions.
Definition: iot_taskpool_types.h:50
IotTaskPoolJob_t
struct _taskPoolJob * IotTaskPoolJob_t
Opaque handle of a Task Pool Job.
Definition: iot_taskpool_types.h:246