Function esp_idf_hal::task::destroy

source ·
pub unsafe fn destroy(task: TaskHandle_t)
Expand description

Deletes a FreeRTOS task.

This API is to be used only for niche use cases like where the std feature is not enabled, or one absolutely needs to create a raw FreeRTOS task.

In all other cases, the standard, safe Rust std::thread API should be utilized, as it is anyway a thin wrapper around the FreeRTOS task API.

§Safety

A valid TaskHandle_t instance of an existing task should be provided. Providing a TaskHandle_t of a task which was already destroyed is an undefined behavior.