---
title: HTL_thread_scheduler_get_pool_count
description: "获取调度器关联的池数。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0074.html
sourcePath: /source/zh/kunpengboostkithistory/2300/accel/kunpengaccel_ksl_16_0074.html
indexId: bedab66c13815d2354e8bbd44bd38135fd4d675a1e9c20400786422f8caf6a5d74
---
# HTL_thread_scheduler_get_pool_count

获取调度器关联的池数。

#### 接口定义

int HTL_thread_scheduler_get_pool_count(HTL_thread_scheduler_t scheduler, int *pool_count);


#### 描述

HTL_thread_scheduler_get_pool_count()返回与调度器关联的线程池个数，并将结果写到pool_count中。


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| scheduler | HTL\_thread\_scheduler\_t | 调度器句柄。 | 输入 |
| pool\_count | int \* | 与调度器关联的池个数。 | 输出 |


#### 返回值

- HTL_THREAD_SUCCESS：成功。
- 其他：失败。见错误码定义。


#### 示例

```
int num_pools;
ret = HTL_thread_scheduler_get_pool_count(scheduler, &num_pools);
```
