Skip to main content

install_delete_handler

Function install_delete_handler 

Source
pub fn install_delete_handler(handler: TaskDeleteHandler) -> Result<()>
Expand description

Installs a handler function to be called when the current task is deleted.

This is useful for cleaning up resources that a task creates before it is removed from the system.

ยงSafety

The provided handler function must be a valid extern "C" function pointer. It will be called in the context of task deletion, so it should be brief and avoid complex operations or blocking, especially any that would try to interact further with OSAL.