aclFinalize
Applicable Products
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function
Performs deinitialization to release resources used by acl APIs in a process.
In scenarios where device service logs need to be sent back to the host, this API adds a delay of 2,000 ms by default (the actual maximum delay can reach 2,000 ms) to ensure that ERROR and EVENT logs are sent back and no data is lost. You can set the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable to 0 (command example: export ASCEND_LOG_DEVICE_FLUSH_TIMEOUT=0) to cancel the default delay. For details about the ASCEND_LOG_DEVICE_FLUSH_TIMEOUT environment variable, see Environment Variables in Logs > ASCEND_LOG_DEVICE_FLUSH_TIMEOUT.
Prototype
1
|
aclError aclFinalize() |
Parameters
None
Returns
0 on success; otherwise, failure. For details, see aclError.
Restrictions
Before an application process exits, ensure that aclFinalize or aclFinalizeReference has been called to complete deinitialization. Otherwise, there may be exceptions. For example, an error is reported when an application process exits.
You are not advised to call aclFinalize or aclFinalizeReference in a destructor. Otherwise, the process may exit abnormally due to the unknown singleton destruction order.