Function: finalize
|
C Prototype |
aclError aclFinalize() |
|---|---|
|
Python Function |
ret = acl.finalize() |
|
Function Usage |
Deinitializes pyACL to clean up pyACL allocations in the process. A 2000 ms timeout interval is added by default (the maximum timeout is 2000 ms) for the transfer of device logs to ensure the integrity of error- and event-level logs. You can set the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable to 0 (by using the export ASCEND_LOG_DEVICE_FLUSH_TIMEOUT=0 command) to cancel the timeout. For details about the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable, see Log Reference. |
|
Input Description |
None |
|
Return Value |
ret: int, error code.
|
|
Restrictions |
This API needs to be called explicitly to deinitialize pyACL before the app process exits. Otherwise, an error is reported, for example, when the app process exits. You are advised not to call acl.finalize in the destructor call. Otherwise, the process may exit abnormally due to the unknown singleton destruction sequence. |
|
Reference |
For details about the API call example, see Initializing pyACL. |