Function: destroy_event
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Supported
- Atlas inference products: Supported
- Atlas training products: Supported
Function
Destroys an event. This API can be called to destroy an event before the event is complete. In this case, this API does not block the thread until the event is complete. Event-related resources are automatically released when the event is complete.
Prototype
-
C Prototype
aclError aclrtDestroyEvent(aclrtEvent event) -
Python Function
ret = acl.rt.destroy_event(event)
Parameters
| Parameter | Description |
|---|---|
| event | Int, pointer address of the event to be destroyed. |
Return Values
| Return Value | Description |
|---|---|
| ret | Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails. |
Constraints
When calling acl.rt.destroy_event to destroy a specified event, ensure that the event is not being used by other APIs.