Task Pool API Reference
Task pool library
IotTaskPool_DestroyRecyclableJob

This function un-initializes a job.

This function will destroy a job created with IotTaskPool_CreateRecyclableJob. A job should not be destroyed twice. A job that was previously scheduled but has not completed yet should not be destroyed, but rather the application should attempt to cancel it first by calling IotTaskPool_TryCancel. An attempt to destroy a job that was scheduled but not yet executed or canceled, may result in a IOT_TASKPOOL_ILLEGAL_OPERATION error.

Parameters
[in]taskPoolA handle to the task pool, e.g. as returned by a call to IotTaskPool_Create or IotTaskPool_CreateSystemTaskPool.
[in]jobA handle to a job that was create with a call to IotTaskPool_CreateJob.
Returns
One of the following:
Warning
The task pool will try and prevent destroying jobs that are currently queued for execution, but does not enforce strict ordering of operations. It is up to the user to make sure IotTaskPool_DestroyRecyclableJob is not called our of order.
Calling this function on job that was not previously created with IotTaskPool_CreateRecyclableJob will result in a IOT_TASKPOOL_ILLEGAL_OPERATION error.
IotTaskPool_t
struct _taskPool * IotTaskPool_t
Opaque handle of a Task Pool instance.
Definition: iot_taskpool_types.h:213
IotTaskPool_DestroyRecyclableJob
IotTaskPoolError_t IotTaskPool_DestroyRecyclableJob(IotTaskPool_t taskPool, IotTaskPoolJob_t job)
This function un-initializes a job.
Definition: iot_taskpool.c:351
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