HTL_thread_cancel
向线程发送取消指令。
接口定义
int HTL_thread_cancel(HTL_thread_t thread);
描述
HTL_thread_cancel()向线程thread发送取消请求。thread可能在其线程函数完成之前终止。
参数
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
thread |
HTL_thread_t |
线程句柄地址。 |
输入 |
返回值
- HTL_THREAD_SUCCESS:成功。
- 其他:失败。见错误码定义。
示例
status = HTL_thread_cancel(thread); if (status != HTL_THREAD_SUCCESS) { ...... }
父主题: 线程函数