HTL_thread_executor_set_scheduler
根据类型设置执行器的调度器。
接口定义
int HTL_thread_executor_set_scheduler(HTL_thread_executor_t executor, HTL_thread_scheduler_type_t sched_type, HTL_thread_pool_t *thread_pools, int pool_count);
描述
HTL_thread_executor_set_scheduler()用于设置执行器的调取器为某一个sched_type类型。
参数
参数名 |
类型 |
描述 |
输入/输出 |
---|---|---|---|
executor |
HTL_thread_executor |
执行器句柄。 |
输入 |
sched_type |
HTL_thread_scheduler_type_t |
预定义调度器。 |
输入 |
thread_pools |
HTL_thread_pool_t * |
线程池地址。 |
输入 |
pool_count |
int |
池数量。 |
输入 |
返回值
- HTL_THREAD_SUCCESS:成功。
- 其他:失败。见错误码定义。
示例
HTL_thread_executor_self(&executors[0]); HTL_thread_executor_set_scheduler(executors[0], HTL_THREAD_SCHEDULER_DEFAULT, &pools[0], 1);
父主题: 执行器函数