---
title: 函数：query_event_wait_status
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0097.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0097.html
indexId: b95cce96e924875f42c5dbbedcc24ab66ff71a627067d0d134e5bd0c7fe3c01471
---
# 函数：query_event_wait_status

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

调用acl.stream_wait_event接口后查询该Event对应的等待任务是否都执行完成。


#### 函数原型

- C函数原型
  1 aclError aclrtQueryEventWaitStatus(aclrtEvent event, aclrtEventWaitStatus *status)

- python函数
  1 status, ret = acl.rt.query_event_wait_status(event)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| event | int，指定待查询的Event对象的指针地址。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| status | int，Event状态的指针地址，具体请参见aclrtEventWaitStatus。 ACL\_EVENT\_RECORDED\_STATUS\_NOT\_READY = 0，Event未被记录到Stream中，或记录到Stream中的Event未被执行或执行失败。 ACL\_EVENT\_RECORDED\_STATUS\_COMPLETE = 1，记录到Stream中的Event执行成功。 |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |


#### 约束说明

通过acl.rt.create_event_ex_with_flag接口创建的Event，不支持调用本接口。
