alf_task_destroy - Destroys the specified task.
int alf_task_destroy(alf_task_handle_t* p_task_handle)
Parameters | |
task_handle [IN] | The pointer to a task handle that is returned by the alf_create_task API. |
This function explicitly destroys the specified task if it is in pending or running state. If there are work blocks that are still not processed, this routine stops the execution of those work blocks. If a task is running when this API is invoked, the task is cancelled before the API returns. Resources associated with this task are recycled by the runtime either synchronously or asynchronously, depending on the runtime implementation. This API does nothing on an already completed task. If a task is destroyed explicitly, all tasks that depend on this task directly or indirectly are destroyed. Because ALF frees task resources automatically, it is not necessary to call this API to free up resources after a task has been run to complete normally. The API should only be used to explicitly end a task when you need to.
0 | Success |
less than 0 | Errors occurred:
|