---
title: 函数：stop_thread
description: "| C函数原型 | 无 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0059.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0059.html
indexId: b2a2c204a5c0e00752385aab9d161d56a7595d17194cb94dbba19645e71a82a171
---
# 函数：stop_thread

| C函数原型 | 无 |
| --- | --- |
| Python函数 | ret = acl.util.stop\_thread(thr\_id) |
| 函数功能 | 等待由acl.util.start\_thread接口创建的线程退出。 |
| 输入说明 | thr\_id：int，线程ID号。需指定由acl.util.start\_thread接口获得的线程ID号。 |
| 返回值说明 | ret：int，错误码。 返回0表示成功。 返回其它值表示失败。 |
| 约束说明 | 无 |
